本文整理汇总了Java中org.apache.zeppelin.helium.HeliumApplicationFactory类的典型用法代码示例。如果您正苦于以下问题:Java HeliumApplicationFactory类的具体用法?Java HeliumApplicationFactory怎么用?Java HeliumApplicationFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HeliumApplicationFactory类属于org.apache.zeppelin.helium包,在下文中一共展示了HeliumApplicationFactory类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ZeppelinServer
import org.apache.zeppelin.helium.HeliumApplicationFactory; //导入依赖的package包/类
public ZeppelinServer() throws Exception {
ZeppelinConfiguration conf = ZeppelinConfiguration.create();
InterpreterOutput.limit = conf.getInt(ConfVars.ZEPPELIN_INTERPRETER_OUTPUT_LIMIT);
HeliumApplicationFactory heliumApplicationFactory = new HeliumApplicationFactory();
HeliumBundleFactory heliumBundleFactory;
if (isBinaryPackage(conf)) {
/* In binary package, zeppelin-web/src/app/visualization and zeppelin-web/src/app/tabledata
* are copied to lib/node_modules/zeppelin-vis, lib/node_modules/zeppelin-tabledata directory.
* Check zeppelin/zeppelin-distribution/src/assemble/distribution.xml to see how they're
* packaged into binary package.
*/
heliumBundleFactory = new HeliumBundleFactory(
conf,
null,
new File(conf.getRelativeDir(ConfVars.ZEPPELIN_DEP_LOCALREPO)),
new File(conf.getRelativeDir("lib/node_modules/zeppelin-tabledata")),
new File(conf.getRelativeDir("lib/node_modules/zeppelin-vis")),
new File(conf.getRelativeDir("lib/node_modules/zeppelin-spell")));
} else {
heliumBundleFactory = new HeliumBundleFactory(
conf,
null,
new File(conf.getRelativeDir(ConfVars.ZEPPELIN_DEP_LOCALREPO)),
new File(conf.getRelativeDir("zeppelin-web/src/app/tabledata")),
new File(conf.getRelativeDir("zeppelin-web/src/app/visualization")),
new File(conf.getRelativeDir("zeppelin-web/src/app/spell")));
}
this.schedulerFactory = SchedulerFactory.singleton();
this.interpreterSettingManager = new InterpreterSettingManager(conf, notebookWsServer,
notebookWsServer, notebookWsServer);
this.replFactory = new InterpreterFactory(interpreterSettingManager);
this.notebookRepo = new NotebookRepoSync(conf);
this.noteSearchService = new LuceneSearch();
this.notebookAuthorization = NotebookAuthorization.getInstance();
this.credentials = new Credentials(
conf.credentialsPersist(),
conf.getCredentialsPath(),
conf.getCredentialsEncryptKey());
notebook = new Notebook(conf,
notebookRepo, schedulerFactory, replFactory, interpreterSettingManager, notebookWsServer,
noteSearchService, notebookAuthorization, credentials);
this.configStorage = ConfigStorage.getInstance(conf);
ZeppelinServer.helium = new Helium(
conf.getHeliumConfPath(),
conf.getHeliumRegistry(),
new File(conf.getRelativeDir(ConfVars.ZEPPELIN_DEP_LOCALREPO),
"helium-registry-cache"),
heliumBundleFactory,
heliumApplicationFactory,
interpreterSettingManager);
// create bundle
try {
heliumBundleFactory.buildAllPackages(helium.getBundlePackagesToBundle());
} catch (Exception e) {
LOG.error(e.getMessage(), e);
}
// to update notebook from application event from remote process.
heliumApplicationFactory.setNotebook(notebook);
// to update fire websocket event on application event.
heliumApplicationFactory.setApplicationEventListener(notebookWsServer);
notebook.addNotebookEventListener(heliumApplicationFactory);
notebook.addNotebookEventListener(notebookWsServer.getNotebookInformationListener());
}
示例2: getHeliumApplicationFactory
import org.apache.zeppelin.helium.HeliumApplicationFactory; //导入依赖的package包/类
public HeliumApplicationFactory getHeliumApplicationFactory() {
return heliumApplicationFactory;
}