Uploaded image for project: 'Bigtop'
  1. Bigtop
  2. BIGTOP-2859

Missing HIVE_VERSION when build hive rpms

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.3.0
    • Component/s: hive
    • Labels:
      None

      Description

      When build hive rpms, the HIVE_VERSION is undefined which leads softlinks in hcatalog/share dir missed and wrong property in hive-site.xml.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user loleek opened a pull request:

          https://github.com/apache/bigtop/pull/267

          BIGTOP-2859: Add hive-version when build hive rpms

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/loleek/bigtop master

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/bigtop/pull/267.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #267


          commit 8eea9b4d6936c21bba7586a41be7b279552029ab
          Author: dengkai02 <dengkai02@baidu.com>
          Date: 2017-07-27T04:06:42Z

          BIGTOP-2859: Add hive-version when build hive rpms


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user loleek opened a pull request: https://github.com/apache/bigtop/pull/267 BIGTOP-2859 : Add hive-version when build hive rpms You can merge this pull request into a Git repository by running: $ git pull https://github.com/loleek/bigtop master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/bigtop/pull/267.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #267 commit 8eea9b4d6936c21bba7586a41be7b279552029ab Author: dengkai02 <dengkai02@baidu.com> Date: 2017-07-27T04:06:42Z BIGTOP-2859 : Add hive-version when build hive rpms
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user c0s commented on the issue:

          https://github.com/apache/bigtop/pull/267

          I wonder how we were getting away with that before?

          Show
          githubbot ASF GitHub Bot added a comment - Github user c0s commented on the issue: https://github.com/apache/bigtop/pull/267 I wonder how we were getting away with that before?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user loleek commented on the issue:

          https://github.com/apache/bigtop/pull/267

          There has no solution before. Without HIVE_VERSION, part of install_hive.sh failed to execute:
          1. sed -i -e "s|@VERSION@|${*HIVE_VERSION*}|" $

          {PREFIX}

          $

          {CONF_DIST_DIR}

          /hive-site.xml
          Property in hive-site.xml becomes
          _<property>
          <name>hive.hwi.war.file</name>
          <value>/usr/lib/hive/lib/hive-hwi-.war</value>
          <description>This is the WAR file with the jsp content for Hive Web Interface</description>
          </property>_
          2.for DIR in $

          {HCATALOG_SHARE_DIR} ; do
          (cd $DIR &&
          for j in hive-hcatalog-*.jar; do
          if [[ $j =~ hive-hcatalog-(.)-${HIVE_VERSION*}.jar ]]; then
          name=${BASH_REMATCH[1]}
          ln s $j hive-hcatalog$name.jar
          fi
          done)
          done
          Softlinks in ${HCATALOG_SHARE_DIR}

          missing.

          Show
          githubbot ASF GitHub Bot added a comment - Github user loleek commented on the issue: https://github.com/apache/bigtop/pull/267 There has no solution before. Without HIVE_VERSION, part of install_hive.sh failed to execute: 1. sed -i -e "s|@VERSION@|${* HIVE_VERSION *}|" $ {PREFIX} $ {CONF_DIST_DIR} /hive-site.xml Property in hive-site.xml becomes _<property> <name>hive.hwi.war.file</name> <value>/usr/lib/hive/lib/hive-hwi-.war</value> <description>This is the WAR file with the jsp content for Hive Web Interface</description> </property>_ 2.for DIR in $ {HCATALOG_SHARE_DIR} ; do (cd $DIR && for j in hive-hcatalog-*.jar; do if [[ $j =~ hive-hcatalog-(. )-${ HIVE_VERSION *}.jar ]]; then name=${BASH_REMATCH[1]} ln s $j hive-hcatalog $name.jar fi done) done Softlinks in ${HCATALOG_SHARE_DIR} missing.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user c0s commented on the issue:

          https://github.com/apache/bigtop/pull/267

          Is this the case in DEB as well?

          Show
          githubbot ASF GitHub Bot added a comment - Github user c0s commented on the issue: https://github.com/apache/bigtop/pull/267 Is this the case in DEB as well?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user loleek commented on the issue:

          https://github.com/apache/bigtop/pull/267

          I think so. I will check and repair in this patch.

          Show
          githubbot ASF GitHub Bot added a comment - Github user loleek commented on the issue: https://github.com/apache/bigtop/pull/267 I think so. I will check and repair in this patch.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user loleek commented on the issue:

          https://github.com/apache/bigtop/pull/267

          DEB has no this issue because when build deb, the HIVE_VERSION has been declared and passed in rules.
          def command = """debuild \
          --preserve-envvar PATH \
          --preserve-envvar MAVEN3_HOME \
          --preserve-envvar MAVEN_OPTS \
          --preserve-envvar JAVA_HOME \
          --preserve-envvar BIGTOP_JDK \
          --set-envvar=HADOOP_VERSION=$HADOOP_VERSION \
          --set-envvar=$

          {toOldStyleName(target)}_BASE_VERSION=$BASE_VERSION \
          --set-envvar=${toOldStyleName(target)}

          _VERSION=$PKG_VERSION \
          --set-envvar=$

          {toOldStyleName(target)}_RELEASE=$BIGTOP_BUILD_STAMP \
          -uc -us -b
          """
          Here the --set-envvar=${toOldStyleName(target)}

          _VERSION=$PKG_VERSION is
          --set-envvar=HIVE_VERSION=$PKG_VERSION

          But the building env in RPM is
          def command = [
          '--define', "_topdir $PKG_BUILD_DIR/rpm/",
          '--define', "$

          {NAME}_base_version $BASE_VERSION",
          '--define', "hadoop_version ${HADOOP_VERSION}",
          '--define', "${NAME}

          _version $

          {PKG_VERSION}

          ",
          '--define', "$

          {NAME}

          _release $

          {BIGTOP_BUILD_STAMP}

          %{?dist}",
          '--rebuild', SRCRPM,
          ]
          All the variables declared are lowercase.

          Show
          githubbot ASF GitHub Bot added a comment - Github user loleek commented on the issue: https://github.com/apache/bigtop/pull/267 DEB has no this issue because when build deb, the HIVE_VERSION has been declared and passed in rules. def command = """debuild \ --preserve-envvar PATH \ --preserve-envvar MAVEN3_HOME \ --preserve-envvar MAVEN_OPTS \ --preserve-envvar JAVA_HOME \ --preserve-envvar BIGTOP_JDK \ --set-envvar=HADOOP_VERSION=$HADOOP_VERSION \ --set-envvar=$ {toOldStyleName(target)}_BASE_VERSION=$BASE_VERSION \ --set-envvar=${toOldStyleName(target)} _VERSION=$PKG_VERSION \ --set-envvar=$ {toOldStyleName(target)}_RELEASE=$BIGTOP_BUILD_STAMP \ -uc -us -b """ Here the --set-envvar=${toOldStyleName(target)} _VERSION=$PKG_VERSION is --set-envvar=HIVE_VERSION=$PKG_VERSION But the building env in RPM is def command = [ '--define', "_topdir $PKG_BUILD_DIR/rpm/", '--define', "$ {NAME}_base_version $BASE_VERSION", '--define', "hadoop_version ${HADOOP_VERSION}", '--define', "${NAME} _version $ {PKG_VERSION} ", '--define', "$ {NAME} _release $ {BIGTOP_BUILD_STAMP} %{?dist}", '--rebuild', SRCRPM, ] All the variables declared are lowercase.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user c0s commented on the issue:

          https://github.com/apache/bigtop/pull/267

          Thanks for checking! And a good find - I will commit it shortly!

          Show
          githubbot ASF GitHub Bot added a comment - Github user c0s commented on the issue: https://github.com/apache/bigtop/pull/267 Thanks for checking! And a good find - I will commit it shortly!
          Hide
          cos Konstantin Boudnik added a comment -

          I have committed and pushed the fix to the master. Thanks for your contribution dengkai!

          Show
          cos Konstantin Boudnik added a comment - I have committed and pushed the fix to the master. Thanks for your contribution dengkai !
          Hide
          cos Konstantin Boudnik added a comment -

          Evans Ye, do you think it is worthy backporting to 1.2.1?

          Show
          cos Konstantin Boudnik added a comment - Evans Ye , do you think it is worthy backporting to 1.2.1?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user loleek closed the pull request at:

          https://github.com/apache/bigtop/pull/267

          Show
          githubbot ASF GitHub Bot added a comment - Github user loleek closed the pull request at: https://github.com/apache/bigtop/pull/267

            People

            • Assignee:
              lolee_k dengkai
              Reporter:
              lolee_k dengkai
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development