[
https://issues.apache.org/jira/browse/HADOOP-12752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15125131#comment-15125131
]
Allen Wittenauer commented on HADOOP-12752:
-------------------------------------------
Oozie uses the env var because there was no other way to set it.
YARN uses it because MR in 1.x used it. It definitely has the advantage of
being cross-language when needing to pass a value. But for usage outside of
YARN, using the env var feels very very wrong given one is stuck with either
building locks around it or doing other things when needing to thread. Hadoop
has a tendency to use env vars for things that shouldn't be. This is one of
them. So yes, we need to document HADOOP_TOKEN_FILES_LOCATION to avoid
namespace collisions (a *huge* problem with Hadoop's env var usage), but we
should still discourage its usage outside of YARN.
> Improve diagnostics/use of envvar/sysprop credential propagation
> ----------------------------------------------------------------
>
> Key: HADOOP-12752
> URL: https://issues.apache.org/jira/browse/HADOOP-12752
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: security
> Affects Versions: 2.7.2
> Reporter: Steve Loughran
>
> * document the system property {{hadoop.token.files}}.
> * document the env var {{HADOOP_TOKEN_FILE_LOCATION}}.
> * When UGI inits tokens off that or the env var , log this fact
> * when trying to load a file referenced in the env var (a) trim it and (b)
> check for it existing, failing with a message referring to the ENV var as
> well as the file.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)