Search in sources :

Example 1 with AuthOozieClient

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;
}
Also used : AuthOozieClient(org.apache.oozie.client.AuthOozieClient) XOozieClient(org.apache.oozie.client.XOozieClient)

Aggregations

AuthOozieClient (org.apache.oozie.client.AuthOozieClient)1 XOozieClient (org.apache.oozie.client.XOozieClient)1