Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-430

Sentry Service does not use correct classpath when HIVE_HOME environment var is defined

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.0
    • 1.5.0
    • None
    • None

    Description

      When HIVE_HOME is set as an environment variable, the Sentry Service will not run with the correct classpath when invoked using "bin/sentry".

      The code below is from "bin/sentry". Note how if HIVE_HOME is defined nothing from lib/server/* is added to the classpath.

      As a side note, it seems strange that there even is a reference to Hive in this context. It seems that the sentry service is being executed via Hive when HIVE_HOME is defined. It seems like we should not do this.

      if [[ -z "$HIVE_HOME" ]]
      then
        for f in ${SENTRY_HOME}/lib/server/*.jar; do
          HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:${f}
        done
        exec $HADOOP jar ${SENTRY_HOME}/lib/${_CMD_JAR} org.apache.sentry.SentryMain ${args[@]}
      else
        _HIVE_CMD=${HIVE_HOME}/bin/hive
        ${_HIVE_CMD} --service jar ${SENTRY_HOME}/lib/${_CMD_JAR} org.apache.sentry.SentryMain ${args[@]}
      fi
      

      Attachments

        1. SENTRY-430.3.patch
          4 kB
          Prasad Suresh Mujumdar
        2. SENTRY-430.2.patch
          3 kB
          Prasad Suresh Mujumdar
        3. SENTRY-430.1.patch
          3 kB
          Prasad Suresh Mujumdar

        Issue Links

          Activity

            People

              prasadm Prasad Suresh Mujumdar
              lskuff Lenni Kuff
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: