use of org.apache.oozie.client.AuthOozieClient in project oozie by apache.
the class OozieCLI method createXOozieClient.
/**
* Create a XOozieClient.
* <p>
* It injects any '-Dheader:' as header to the the {@link org.apache.oozie.client.OozieClient}.
*
* @param commandLine the parsed command line options.
* @return a pre configured eXtended workflow client.
* @throws OozieCLIException thrown if the XOozieClient could not be configured.
*/
protected XOozieClient createXOozieClient(CommandLine commandLine) throws OozieCLIException {
XOozieClient wc = new AuthOozieClient(getOozieUrl(commandLine), getAuthOption(commandLine));
addHeader(wc);
setDebugMode(wc, commandLine.hasOption(DEBUG_OPTION));
setRetryCount(wc);
return wc;
}
Aggregations