Search in sources :

Example 1 with HeliumApplicationFactory

use of org.apache.zeppelin.helium.HeliumApplicationFactory in project SSM by Intel-bigdata.

the class SmartZeppelinServer method init.

private void init() throws Exception {
    this.depResolver = new DependencyResolver(zconf.getString(ConfVars.ZEPPELIN_INTERPRETER_LOCALREPO));
    InterpreterOutput.limit = zconf.getInt(ConfVars.ZEPPELIN_INTERPRETER_OUTPUT_LIMIT);
    HeliumApplicationFactory heliumApplicationFactory = new HeliumApplicationFactory();
    HeliumVisualizationFactory heliumVisualizationFactory;
    if (isBinaryPackage(zconf)) {
        /* 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.
       */
        heliumVisualizationFactory = new HeliumVisualizationFactory(zconf, new File(zconf.getRelativeDir(ConfVars.ZEPPELIN_DEP_LOCALREPO)), new File(zconf.getRelativeDir("lib/node_modules/zeppelin-tabledata")), new File(zconf.getRelativeDir("lib/node_modules/zeppelin-vis")));
    } else {
        heliumVisualizationFactory = new HeliumVisualizationFactory(zconf, new File(zconf.getRelativeDir(ConfVars.ZEPPELIN_DEP_LOCALREPO)), // new File(zconf.getRelativeDir("zeppelin-web/src/app/visualization")));
        new File(zconf.getRelativeDir("smart-zeppelin/zeppelin-web/src/app/tabledata")), new File(zconf.getRelativeDir("smart-zeppelin/zeppelin-web/src/app/visualization")));
    }
    this.helium = new Helium(zconf.getHeliumConfPath(), zconf.getHeliumDefaultLocalRegistryPath(), heliumVisualizationFactory, heliumApplicationFactory);
    // create visualization bundle
    try {
        heliumVisualizationFactory.bundle(helium.getVisualizationPackagesToBundle());
    } catch (Exception e) {
        LOG.error(e.getMessage(), e);
    }
    this.schedulerFactory = new SchedulerFactory();
    this.interpreterSettingManager = new InterpreterSettingManager(zconf, depResolver, new InterpreterOption(true));
    this.noteSearchService = new LuceneSearch();
    this.notebookAuthorization = NotebookAuthorization.init(zconf);
    this.credentials = new Credentials(zconf.credentialsPersist(), zconf.getCredentialsPath());
}
Also used : HeliumApplicationFactory(org.apache.zeppelin.helium.HeliumApplicationFactory) InterpreterOption(org.apache.zeppelin.interpreter.InterpreterOption) LuceneSearch(org.apache.zeppelin.search.LuceneSearch) InterpreterSettingManager(org.apache.zeppelin.interpreter.InterpreterSettingManager) Helium(org.apache.zeppelin.helium.Helium) File(java.io.File) Credentials(org.apache.zeppelin.user.Credentials) DependencyResolver(org.apache.zeppelin.dep.DependencyResolver) HeliumVisualizationFactory(org.apache.zeppelin.helium.HeliumVisualizationFactory) SchedulerFactory(org.apache.zeppelin.scheduler.SchedulerFactory)

Aggregations

File (java.io.File)1 DependencyResolver (org.apache.zeppelin.dep.DependencyResolver)1 Helium (org.apache.zeppelin.helium.Helium)1 HeliumApplicationFactory (org.apache.zeppelin.helium.HeliumApplicationFactory)1 HeliumVisualizationFactory (org.apache.zeppelin.helium.HeliumVisualizationFactory)1 InterpreterOption (org.apache.zeppelin.interpreter.InterpreterOption)1 InterpreterSettingManager (org.apache.zeppelin.interpreter.InterpreterSettingManager)1 SchedulerFactory (org.apache.zeppelin.scheduler.SchedulerFactory)1 LuceneSearch (org.apache.zeppelin.search.LuceneSearch)1 Credentials (org.apache.zeppelin.user.Credentials)1