Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-14066

VersionInfo should be marked as public API

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 2.7.4, 3.0.0-alpha4, 2.8.2
    • Component/s: common
    • Labels:
      None

      Description

      org.apache.hadoop.util.VersionInfo is commonly used by applications that work with multiple versions of Hadoop.
      In case of Hive, this is used in a shims layer to identify the version of hadoop and use different shim code based on version (and the corresponding api it supports).
      I checked Pig and Hbase as well and they also use this class to get version information.
      However, this method is annotated as "@private" and "@unstable".
      This code has actually been stable for long time and is widely used like a public api. I think we should mark it as such.
      Note that there are apis to find the version of server components in hadoop, however, this class necessary for finding the version of client.

        Issue Links

          Activity

          Hide
          vinodkv Vinod Kumar Vavilapalli added a comment -

          2.8.1 became a security release. Moving fix-version to 2.8.2 after the fact.

          Show
          vinodkv Vinod Kumar Vavilapalli added a comment - 2.8.1 became a security release. Moving fix-version to 2.8.2 after the fact.
          Hide
          brahmareddy Brahma Reddy Battula added a comment - - edited

          Looks CHANGES.txt is not updated for branch-2.7..?

          Show
          brahmareddy Brahma Reddy Battula added a comment - - edited Looks CHANGES.txt is not updated for branch-2.7..?
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11591 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11591/)
          HADOOP-14066 VersionInfo should be marked as public API (stevel: rev 2ed65540a3fe73db5d2dd0d25e658ccf13c9188a)

          • (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/VersionInfo.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11591 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11591/ ) HADOOP-14066 VersionInfo should be marked as public API (stevel: rev 2ed65540a3fe73db5d2dd0d25e658ccf13c9188a) (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/VersionInfo.java
          Hide
          andrew.wang Andrew Wang added a comment -

          Pushed to some additional branches, thanks Steve for the confirmation.

          Show
          andrew.wang Andrew Wang added a comment - Pushed to some additional branches, thanks Steve for the confirmation.
          Hide
          stevel@apache.org Steve Loughran added a comment -

          There's no harm, though as all we are doing is tagging the interface as public in future, we're implicitly marking it as public everywhere.

          Show
          stevel@apache.org Steve Loughran added a comment - There's no harm, though as all we are doing is tagging the interface as public in future, we're implicitly marking it as public everywhere.
          Hide
          andrew.wang Andrew Wang added a comment -

          Should this also go into 2.9/2.8/2.7, since the point of this API is doing cross-version shims?

          Show
          andrew.wang Andrew Wang added a comment - Should this also go into 2.9/2.8/2.7, since the point of this API is doing cross-version shims?
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11556 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11556/)
          HADOOP-14066 VersionInfo should be marked as public API (stevel: rev 2ed65540a3fe73db5d2dd0d25e658ccf13c9188a)

          • (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/VersionInfo.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11556 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11556/ ) HADOOP-14066 VersionInfo should be marked as public API (stevel: rev 2ed65540a3fe73db5d2dd0d25e658ccf13c9188a) (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/VersionInfo.java
          Hide
          stevel@apache.org Steve Loughran added a comment -

          +1, just needs someone to sit down and do the commit

          Show
          stevel@apache.org Steve Loughran added a comment - +1, just needs someone to sit down and do the commit
          Hide
          andrew.wang Andrew Wang added a comment -

          Ping, do we want to get this in still? Marked as a Critical.

          Show
          andrew.wang Andrew Wang added a comment - Ping, do we want to get this in still? Marked as a Critical.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 15s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
          +1 mvninstall 12m 55s trunk passed
          +1 compile 11m 59s trunk passed
          +1 checkstyle 0m 29s trunk passed
          +1 mvnsite 1m 1s trunk passed
          +1 mvneclipse 0m 19s trunk passed
          +1 findbugs 1m 26s trunk passed
          +1 javadoc 0m 46s trunk passed
          +1 mvninstall 0m 38s the patch passed
          +1 compile 11m 59s the patch passed
          +1 javac 11m 59s the patch passed
          +1 checkstyle 0m 29s hadoop-common-project/hadoop-common: The patch generated 0 new + 10 unchanged - 1 fixed = 10 total (was 11)
          +1 mvnsite 1m 1s the patch passed
          +1 mvneclipse 0m 19s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 37s the patch passed
          +1 javadoc 0m 51s the patch passed
          -1 unit 8m 35s hadoop-common in the patch failed.
          +1 asflicense 0m 32s The patch does not generate ASF License warnings.
          56m 59s



          Reason Tests
          Failed junit tests hadoop.security.TestKDiag



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:a9ad5d6
          JIRA Issue HADOOP-14066
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12852506/HADOOP-14066.01.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 374349d9ef23 3.13.0-106-generic #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 71c23c9
          Default Java 1.8.0_121
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/11620/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt
          Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/11620/testReport/
          modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/11620/console
          Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 15s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 mvninstall 12m 55s trunk passed +1 compile 11m 59s trunk passed +1 checkstyle 0m 29s trunk passed +1 mvnsite 1m 1s trunk passed +1 mvneclipse 0m 19s trunk passed +1 findbugs 1m 26s trunk passed +1 javadoc 0m 46s trunk passed +1 mvninstall 0m 38s the patch passed +1 compile 11m 59s the patch passed +1 javac 11m 59s the patch passed +1 checkstyle 0m 29s hadoop-common-project/hadoop-common: The patch generated 0 new + 10 unchanged - 1 fixed = 10 total (was 11) +1 mvnsite 1m 1s the patch passed +1 mvneclipse 0m 19s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 37s the patch passed +1 javadoc 0m 51s the patch passed -1 unit 8m 35s hadoop-common in the patch failed. +1 asflicense 0m 32s The patch does not generate ASF License warnings. 56m 59s Reason Tests Failed junit tests hadoop.security.TestKDiag Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue HADOOP-14066 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12852506/HADOOP-14066.01.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 374349d9ef23 3.13.0-106-generic #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 71c23c9 Default Java 1.8.0_121 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HADOOP-Build/11620/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/11620/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/11620/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          +1 for doing this.

          Show
          ajisakaa Akira Ajisaka added a comment - +1 for doing this.
          Hide
          stevel@apache.org Steve Loughran added a comment -

          I'm happy with this, though I do know that Hive does overreact to version 3 JARs; we've had to add the ability to lie about versions to shut it up -Ddeclared.hadoop.version=2.11

          Show
          stevel@apache.org Steve Loughran added a comment - I'm happy with this, though I do know that Hive does overreact to version 3 JARs; we've had to add the ability to lie about versions to shut it up -Ddeclared.hadoop.version=2.11

            People

            • Assignee:
              ajisakaa Akira Ajisaka
              Reporter:
              thejas Thejas M Nair
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development