0

What would be the best way to use an environment variables declared for different users in a cluster(all nodes) and make a call to a oozie workflow (Cloudera) and the container of yarn recover the environment variable according to the user.

In the configuration of yarn in Cloudera manager seems to have references of this kind, something like ENVVAR_USER=$ENVVAR_USER.

It is a way to get a different properties file depending on the user making the call.

1 Answers1

0

You could define one set of env. variables for every user, then resolve the actual values based on actual user name:

### per-user config
Sex_Mary=female
Sex_Mario=male

### resolving config for current user
User=Mario
eval Sex=\$Sex_$User

echo $Sex

But it's an old Unix trick, nothing to do with Hadoop or Cloudera. And maintaining the whole config would be a chore.

Any chance you can store the values in LDAP, and retrieve them dynamically with ldapsearch plus sed or awk??

Samson Scharfrichter
  • 8,884
  • 1
  • 17
  • 36