use of org.apache.oozie.LocalOozieClientBundle in project oozie by apache.
the class LocalOozie method getClientBundle.
/**
* <p>
* The returned instance is configured with the user name of the JVM (the
* value of the system property 'user.name').
* <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}.
*
* @return a {@link org.apache.oozie.client.OozieClient} for LocalOozie.
*/
public static OozieClient getClientBundle(String user) {
if (!localOozieActive) {
throw new IllegalStateException("LocalOozie is not initialized");
}
ParamChecker.notEmpty(user, "user");
BundleEngine bundleEngine = Services.get().get(BundleEngineService.class).getBundleEngine(user);
return new LocalOozieClientBundle(bundleEngine);
}
Aggregations