当前位置: 首页>>代码示例>>Java>>正文


Java HeliumApplicationFactory.setApplicationEventListener方法代码示例

本文整理汇总了Java中org.apache.zeppelin.helium.HeliumApplicationFactory.setApplicationEventListener方法的典型用法代码示例。如果您正苦于以下问题:Java HeliumApplicationFactory.setApplicationEventListener方法的具体用法?Java HeliumApplicationFactory.setApplicationEventListener怎么用?Java HeliumApplicationFactory.setApplicationEventListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.zeppelin.helium.HeliumApplicationFactory的用法示例。


在下文中一共展示了HeliumApplicationFactory.setApplicationEventListener方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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());
}
 
开发者ID:apache,项目名称:zeppelin,代码行数:74,代码来源:ZeppelinServer.java


注:本文中的org.apache.zeppelin.helium.HeliumApplicationFactory.setApplicationEventListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。