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


Java DependencyResolver类代码示例

本文整理汇总了Java中org.apache.zeppelin.dep.DependencyResolver的典型用法代码示例。如果您正苦于以下问题:Java DependencyResolver类的具体用法?Java DependencyResolver怎么用?Java DependencyResolver使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DependencyResolver类属于org.apache.zeppelin.dep包,在下文中一共展示了DependencyResolver类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadUnloadApplication

import org.apache.zeppelin.dep.DependencyResolver; //导入依赖的package包/类
@Test
public void loadUnloadApplication() throws Exception {
  // given
  LocalResourcePool resourcePool = new LocalResourcePool("pool1");
  DependencyResolver dep = new DependencyResolver(tmpDir.getAbsolutePath());
  ApplicationLoader appLoader = new ApplicationLoader(resourcePool, dep);

  HeliumPackage pkg1 = createPackageInfo(MockApplication1.class.getName(), "artifact1");
  ApplicationContext context1 = createContext("note1", "paragraph1", "app1");

  // when load application
  MockApplication1 app = (MockApplication1) ((ClassLoaderApplication)
      appLoader.load(pkg1, context1)).getInnerApplication();

  // then
  assertFalse(app.isUnloaded());
  assertEquals(0, app.getNumRun());

  // when unload
  app.unload();

  // then
  assertTrue(app.isUnloaded());
  assertEquals(0, app.getNumRun());
}
 
开发者ID:apache,项目名称:zeppelin,代码行数:26,代码来源:ApplicationLoaderTest.java

示例2: InterpreterSettingManager

import org.apache.zeppelin.dep.DependencyResolver; //导入依赖的package包/类
public InterpreterSettingManager(ZeppelinConfiguration conf,
                                 InterpreterOption defaultOption,
                                 AngularObjectRegistryListener angularObjectRegistryListener,
                                 RemoteInterpreterProcessListener
                                       remoteInterpreterProcessListener,
                                 ApplicationEventListener appEventListener,
                                 ConfigStorage configStorage) throws IOException {
  this.conf = conf;
  this.defaultOption = defaultOption;
  this.interpreterDirPath = Paths.get(conf.getInterpreterDir());
  LOGGER.debug("InterpreterRootPath: {}", interpreterDirPath);
  this.dependencyResolver = new DependencyResolver(
      conf.getString(ConfVars.ZEPPELIN_INTERPRETER_LOCALREPO));
  this.interpreterRepositories = dependencyResolver.getRepos();
  this.interpreterGroupOrderList = Arrays.asList(conf.getString(
      ConfVars.ZEPPELIN_INTERPRETER_GROUP_ORDER).split(","));
  this.gson = new GsonBuilder().setPrettyPrinting().create();

  this.angularObjectRegistryListener = angularObjectRegistryListener;
  this.remoteInterpreterProcessListener = remoteInterpreterProcessListener;
  this.appEventListener = appEventListener;
  this.recoveryStorage = ReflectionUtils.createClazzInstance(conf.getRecoveryStorageClass(),
      new Class[] {ZeppelinConfiguration.class, InterpreterSettingManager.class},
      new Object[] {conf, this});
  this.recoveryStorage.init();
  LOGGER.info("Using RecoveryStorage: " + this.recoveryStorage.getClass().getName());
  this.lifecycleManager = ReflectionUtils.createClazzInstance(conf.getLifecycleManagerClass(),
      new Class[] {ZeppelinConfiguration.class},
      new Object[] {conf});
  LOGGER.info("Using LifecycleManager: " + this.lifecycleManager.getClass().getName());

  this.configStorage = configStorage;

  init();
}
 
开发者ID:apache,项目名称:zeppelin,代码行数:36,代码来源:InterpreterSettingManager.java

示例3: setUp

import org.apache.zeppelin.dep.DependencyResolver; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
  String zpath = System.getProperty("java.io.tmpdir")+"/ZeppelinLTest_"+System.currentTimeMillis();
  mainZepDir = new File(zpath);
  mainZepDir.mkdirs();
  new File(mainZepDir, "conf").mkdirs();
  String mainNotePath = zpath+"/notebook";
  String secNotePath = mainNotePath + "_secondary";
  mainNotebookDir = new File(mainNotePath);
  secNotebookDir = new File(secNotePath);
  mainNotebookDir.mkdirs();
  secNotebookDir.mkdirs();

  System.setProperty(ConfVars.ZEPPELIN_HOME.getVarName(), mainZepDir.getAbsolutePath());
  System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), mainNotebookDir.getAbsolutePath());
  System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_STORAGE.getVarName(), "org.apache.zeppelin.notebook.repo.VFSNotebookRepo,org.apache.zeppelin.notebook.repo.mock.VFSNotebookRepoMock");
  System.setProperty(ConfVars.ZEPPELIN_NOTEBOOK_ONE_WAY_SYNC.getVarName(), "false");
  LOG.info("main Note dir : " + mainNotePath);
  LOG.info("secondary note dir : " + secNotePath);
  conf = ZeppelinConfiguration.create();

  this.schedulerFactory = SchedulerFactory.singleton();

  depResolver = new DependencyResolver(mainZepDir.getAbsolutePath() + "/local-repo");
  interpreterSettingManager = new InterpreterSettingManager(conf,
      mock(AngularObjectRegistryListener.class), mock(RemoteInterpreterProcessListener.class), mock(ApplicationEventListener.class));
  factory = new InterpreterFactory(interpreterSettingManager);

  search = mock(SearchService.class);
  notebookRepoSync = new NotebookRepoSync(conf);
  notebookAuthorization = NotebookAuthorization.init(conf);
  credentials = new Credentials(conf.credentialsPersist(), conf.getCredentialsPath(), null);
  notebookSync = new Notebook(conf, notebookRepoSync, schedulerFactory, factory, interpreterSettingManager, this, search,
          notebookAuthorization, credentials);
  anonymous = new AuthenticationInfo("anonymous");
}
 
开发者ID:apache,项目名称:zeppelin,代码行数:37,代码来源:NotebookRepoSyncTest.java

示例4: setDependencyResolver

import org.apache.zeppelin.dep.DependencyResolver; //导入依赖的package包/类
public Builder setDependencyResolver(DependencyResolver dependencyResolver) {
  interpreterSetting.dependencyResolver = dependencyResolver;
  return this;
}
 
开发者ID:apache,项目名称:zeppelin,代码行数:5,代码来源:InterpreterSetting.java

示例5: getDependencyResolver

import org.apache.zeppelin.dep.DependencyResolver; //导入依赖的package包/类
public DependencyResolver getDependencyResolver() {
  return dependencyResolver;
}
 
开发者ID:apache,项目名称:zeppelin,代码行数:4,代码来源:InterpreterSetting.java

示例6: ApplicationLoader

import org.apache.zeppelin.dep.DependencyResolver; //导入依赖的package包/类
public ApplicationLoader(ResourcePool resourcePool, DependencyResolver depResolver) {
  this.depResolver = depResolver;
  this.resourcePool = resourcePool;
  cached = Collections.synchronizedMap(
      new HashMap<HeliumPackage, Class<Application>>());
}
 
开发者ID:apache,项目名称:zeppelin,代码行数:7,代码来源:ApplicationLoader.java

示例7: getDepResolver

import org.apache.zeppelin.dep.DependencyResolver; //导入依赖的package包/类
public DependencyResolver getDepResolver() {
  return depResolver;
}
 
开发者ID:hopshadoop,项目名称:hopsworks,代码行数:4,代码来源:ZeppelinConfig.java

示例8: setDepResolver

import org.apache.zeppelin.dep.DependencyResolver; //导入依赖的package包/类
public void setDepResolver(DependencyResolver depResolver) {
  this.depResolver = depResolver;
}
 
开发者ID:hopshadoop,项目名称:hopsworks,代码行数:4,代码来源:ZeppelinConfig.java


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