...
All CDAP functions are provided in a library shell file, which can be sourced to easily interact with CDAP from the command line, especially useful for integrating CDAP into new deployment or management systems. Below is a list of functions which may be useful to integrators.
Function | Input | Output | Description |
---|---|---|---|
cdap_home | location of CDAP | Returns the location of CDAP Home to STDOUT | |
cdap_get_conf | property name, file to read, default response (optional) | value of property or default response | Returns 1 if property isn't found and no default is set |
cdap_kinit | CDAP_PRINCIPAL (optional), CDAP_KEYTAB (optional) | Initializes Kerberos ticket using variables or cdap-site.xml configuration | |
cdap_set_java | JAVA_HOME (optional) | exports JAVA | Sets location to java binary in JAVA variable, uses JAVA_HOME, if set |
cdap_service | service, action, arguments (optional) | Executes the given service with the correct environment | |
cdap_start_java | Executes a CDAP Java service with the given environment | ||
cdap_run_class | class name, arguments (optional) | Executes a non-service Java class with arguments using the CDAP Master environment | |
cdap_context | CDAP_HOME | context | Returns the CDAP_HOME context (sdk or distributed) to STDOUT |
cdap_version | CDAP_HOME, component (optional) | version | Returns the CDAP_HOME version to STDOUT |