Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Fetch JAVA_HOME set on cluster using Cloudera Manager APIs

Highlighted

Fetch JAVA_HOME set on cluster using Cloudera Manager APIs

Contributor

Hi,

 

Is there a way to programmatically fetch value of JAVA_HOME env variable set on cluster using Cloudera Manager APIs? 

 

Thanks

Sumit

1 REPLY 1

Re: Fetch JAVA_HOME set on cluster using Cloudera Manager APIs

Contributor

One way I could find so far where I can find ENV variables is say by going to some instance specific page (such as say, NodeManager):

 

http://inldmcdh1.example.com:7180/cmf/services/7/instances/71/processes

 

The page shows:

Environment Variables:

INFA_TRUSTSTORE=/opt/manojkeyfiles
JAVA_HOME=/opt/java/jdk1.8.0_45
YARN_LOG_DIR=/data/hadooplogs/var/log/hadoop-yarn
YARN_ROOT_LOGGER=INFO,RFA
IS_KERBERIZED=false
YARN_LOGFILE=hadoop-cmf-yarn-NODEMANAGER-inldmcdh2.example.com.log.out
NM_LOCAL_DIRS=/data/yarn/nm /dfs/1/yarn/nm /dfs/2/yarn/nm /dfs/3/yarn/nm /dfs/4/yarn/nm /dfs/5/yarn/nm
CDH_VERSION=5
KRB5_CONFIG=/opt/keytab/krb5.conf
YARN_NODEMANAGER_OPTS=-Xms1073741824 -Xmx1073741824 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -Dhadoop.event.appender=,EventCatcher -XX:OnOutOfMemoryError={{AGENT_COMMON_DIR}}/killparent.sh
HADOOP_CLIENT_CONF_DIR=/etc/hadoop/conf.cloudera.yarn

 

Is there a direct API to get the ENV vars from here?

 

Thanks,

Sumit