gpt4 book ai didi

com.dremio.provision.yarn.YarnController.startCluster()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 16:25:31 25 4
gpt4 key购买 nike

本文整理了Java中com.dremio.provision.yarn.YarnController.startCluster()方法的一些代码示例,展示了YarnController.startCluster()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YarnController.startCluster()方法的具体详情如下:
包路径:com.dremio.provision.yarn.YarnController
类名称:YarnController
方法名:startCluster

YarnController.startCluster介绍

暂无

代码示例

代码示例来源:origin: dremio/dremio-oss

@Test
public void testStopCluster() throws Exception {
 assumeNonMaprProfile();
 Cluster myCluster = createCluster();
 myCluster.setState(ClusterState.RUNNING);
 YarnController controller = Mockito.mock(YarnController.class);
 YarnService yarnService = new YarnService(new TestListener(), controller, Mockito.mock(NodeProvider.class));
 TwillController twillController = Mockito.mock(TwillController.class);
 RunId runId = RunIds.generate();
 when(controller.startCluster(any(YarnConfiguration.class), eq(myCluster.getClusterConfig().getSubPropertyList())))
  .thenReturn(twillController);
 when(twillController.getRunId()).thenReturn(runId);
 myCluster.setRunId(new com.dremio.provision.RunId(runId.getId()));
 yarnService.stopCluster(myCluster);
 assertEquals(ClusterState.STOPPED, myCluster.getState());
}

代码示例来源:origin: dremio/dremio-oss

ResourceReport resourceReport = Mockito.mock(ResourceReport.class);
when(controller.startCluster(any(YarnConfiguration.class), any(List.class)))
 .thenReturn(twillController);
when(twillController.getRunId()).thenReturn(runId);

代码示例来源:origin: dremio/dremio-oss

private ClusterEnriched startClusterAsync(Cluster cluster) throws YarnProvisioningHandlingException {
 YarnConfiguration yarnConfiguration = new YarnConfiguration();
 updateYarnConfiguration(cluster, yarnConfiguration);
 List<Property> props = cluster.getClusterConfig().getSubPropertyList();
 // only to show those props on UI/API
 defaultsConfigurator.getDistroTypeDefaultsConfigurator(
  cluster.getClusterConfig().getDistroType(), cluster.getClusterConfig().getIsSecure()).mergeProperties(props);
 List<Property> cleansedProperties = new ArrayList<>();
 for (Property prop : props) {
  if (!EXCLUDED.contains(prop.getKey())) {
   cleansedProperties.add(prop);
  }
 }
 // async call - unfortunately I can not add event handlers before start of TwillController
 // which means we can miss failures
 TwillController twillController = yarnController.startCluster(yarnConfiguration, cleansedProperties);
 String runId = twillController.getRunId().getId();
 RunId dRunId = new RunId(runId);
 cluster.setState(ClusterState.STARTING);
 cluster.setRunId(dRunId);
 OnRunningRunnable onRunning = new OnRunningRunnable(cluster);
 twillController.onRunning(onRunning, Threads.SAME_THREAD_EXECUTOR);
 initOnTerminatingThread(cluster, twillController);
 return getClusterInfo(cluster);
}

代码示例来源:origin: dremio/dremio-oss

when(controller.startCluster(any(YarnConfiguration.class), eq(cluster.getClusterConfig().getSubPropertyList())))
 .thenReturn(twillController);
when(controller.getTwillService(cluster.getId())).thenReturn(twillRunnerService);

代码示例来源:origin: dremio/dremio-oss

ResourceReport resourceReport = Mockito.mock(ResourceReport.class);
when(controller.startCluster(any(YarnConfiguration.class), any(List.class)))
 .thenReturn(twillController);
when(twillController.getRunId()).thenReturn(runId);

代码示例来源:origin: dremio/dremio-oss

ResourceReport resourceReport = Mockito.mock(ResourceReport.class);
when(controller.startCluster(any(YarnConfiguration.class), any(List.class)))
 .thenReturn(twillController);
when(twillController.getRunId()).thenReturn(runId);

代码示例来源:origin: dremio/dremio-oss

ResourceReport resourceReport = Mockito.mock(ResourceReport.class);
when(controller.startCluster(any(YarnConfiguration.class), any(List.class)))
 .thenReturn(twillController);
when(twillController.getRunId()).thenReturn(runId);

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com