You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by "Prasad Mujumdar (JIRA)" <ji...@apache.org> on 2014/09/18 03:43:35 UTC

[jira] [Commented] (SENTRY-430) Sentry Service does not use correct classpath when HIVE_HOME environment var is defined

    [ https://issues.apache.org/jira/browse/SENTRY-430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14138372#comment-14138372 ] 

Prasad Mujumdar commented on SENTRY-430:
----------------------------------------

I believe this done when merging the DB service with existing due to jar conflict between config tool and DB service. The config tool invokes Hive for most of the diagnostic options and requires Hive jars in classpath. The Sentry service has it's own copy of the some of the jars like DataNucleus, common-lang, thrift etc which could possibly conflict with what Hive uses. Hence the script makes the assumption that when you have Hive env set, then you are invoking config tool and doesn't include server jars in the classpath.


> Sentry Service does not use correct classpath when HIVE_HOME environment var is defined
> ---------------------------------------------------------------------------------------
>
>                 Key: SENTRY-430
>                 URL: https://issues.apache.org/jira/browse/SENTRY-430
>             Project: Sentry
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: Lenni Kuff
>            Assignee: Arun Suresh
>
> 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.
> {code}
> 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
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)