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.

How do I append to the yarn.application.classpath using the API via curl?

Highlighted

How do I append to the yarn.application.classpath using the API via curl?

Explorer

Cloudera Manager GUI adds a "value" element which INCLUDES the default values.

 

How is this accomplished via the API?

 

 

Here's an example of the JSON object before adding to the YARN application classpath via Cloudera Manager :

 

BEFORE - note there is no "value" key.

 

{
"name" : "yarn_application_classpath",
"required" : false,
"default" : "$HADOOP_CLIENT_CONF_DIR,$HADOOP_CONF_DIR,$HADOOP_COMMON_HOME/*,$HADOOP_COMMON_HOME/lib/*,$HADOOP_HDFS_HOME/*,$HADOOP_HDFS_HOME/lib/*,$HADOOP_YARN_HOME/*,$HADOOP_YARN_HOME/lib/*",
"displayName" : "YARN Application Classpath",
"description" : "Entries to add to the classpaths of YARN applications.",
"relatedName" : "yarn.application.classpath",
"validationState" : "OK"
}

 

 

 

AFTER - note the "value" key that was added by Cloudera Manager where the value INCLUDES the default values in a comma separated list.

 

{
"name" : "yarn_application_classpath",
"value" : "$HADOOP_CLIENT_CONF_DIR,$HADOOP_CONF_DIR,$HADOOP_COMMON_HOME/*,$HADOOP_COMMON_HOME/lib/*,$HADOOP_HDFS_HOME/*,$HADOOP_HDFS_HOME/lib/*,$HADOOP_YARN_HOME/*,$HADOOP_YARN_HOME/lib/*,/opt/custom/application/lib/*",
"required" : false,
"default" : "$HADOOP_CLIENT_CONF_DIR,$HADOOP_CONF_DIR,$HADOOP_COMMON_HOME/*,$HADOOP_COMMON_HOME/lib/*,$HADOOP_HDFS_HOME/*,$HADOOP_HDFS_HOME/lib/*,$HADOOP_YARN_HOME/*,$HADOOP_YARN_HOME/lib/*",
"displayName" : "YARN Application Classpath",
"description" : "Entries to add to the classpaths of YARN applications.",
"relatedName" : "yarn.application.classpath",
"validationState" : "OK"
}

 

 

 

I need to do the same using curl.  I don't have the option of adding the python or java client libs on the customer

cluster.

 

 

Is this possible with a simple PUT reqeust or is something fancy required?

 

 

Thanks,

Kirk

 

 

 

 

Don't have an account?
Coming from Hortonworks? Activate your account here