use of org.apache.oozie.LocalOozieClientCoord in project oozie by apache.
the class LocalOozie method getClientCoord.
/**
* Return a {@link org.apache.oozie.client.OozieClient} for LocalOozie
* configured for a given user.
* <p>
* The following methods of the client are NOP in the returned instance:
* {@link org.apache.oozie.client.OozieClient#validateWSVersion},
* {@link org.apache.oozie.client.OozieClient#setHeader},
* {@link org.apache.oozie.client.OozieClient#getHeader},
* {@link org.apache.oozie.client.OozieClient#removeHeader},
* {@link org.apache.oozie.client.OozieClient#getHeaderNames},
* {@link org.apache.oozie.client.OozieClient#setSystemMode(OozieClient.SYSTEM_MODE)},
* {@link org.apache.oozie.client.OozieClient#getHeaders},
* {@link org.apache.oozie.client.OozieClient#getClientBuildVersion}.
*
* @param user user name to use in LocalOozie for running coordinator.
* @return a {@link org.apache.oozie.client.OozieClient} for LocalOozie
* configured for the given user.
*/
public static OozieClient getClientCoord(String user) {
if (!localOozieActive) {
throw new IllegalStateException("LocalOozie is not initialized");
}
ParamChecker.notEmpty(user, "user");
CoordinatorEngine coordEngine = Services.get().get(CoordinatorEngineService.class).getCoordinatorEngine(user);
return new LocalOozieClientCoord(coordEngine);
}
Aggregations