Examples of YarnCluster


Examples of org.springframework.yarn.test.context.YarnCluster

      }
      Thread.sleep(1000);
    }
    assertThat(state, notNullValue());

    YarnCluster cluster = (YarnCluster) ctx.getBean("yarnCluster");
    File testWorkDir = cluster.getYarnWorkDir();

    PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
    String locationPattern = "file:" + testWorkDir.getAbsolutePath() + "/**/" + applicationId.toString() + "/**/*.std*";
    Resource[] resources = resolver.getResources(locationPattern);

View Full Code Here

Examples of org.springframework.yarn.test.context.YarnCluster

   *
   * @param clusterInfo the info about the cluster
   * @return the running mini cluster
   */
  public YarnCluster getCluster(ClusterInfo clusterInfo) {
    YarnCluster cluster = clusters.get(clusterInfo);
    if (cluster == null) {
      log.info("Building new cluster for ClusterInfo=" + clusterInfo);
      try {
        YarnClusterFactoryBean fb = new YarnClusterFactoryBean();
        fb.setClusterId("yarn-" + clusterInfo.hashCode());
View Full Code Here

Examples of org.springframework.yarn.test.context.YarnCluster

  private static String path3 = BASE + "file3";

  @Test
  public void testOneStandalone() throws Exception {
    YarnClusterManager manager = YarnClusterManager.getInstance();
    YarnCluster cluster = manager.getCluster(new ClusterInfo());
    cluster.start();
   
    Configuration configuration = cluster.getConfiguration();
   
    // these are not yet created
    checkFileNotExists(configuration, path1);
    checkFileNotExists(configuration, path2);
    checkFileNotExists(configuration, path3);
View Full Code Here

Examples of org.springframework.yarn.test.context.YarnCluster

  }

  @Test
  public void testTwoStandalone() throws Exception {
    YarnClusterManager manager = YarnClusterManager.getInstance();
    YarnCluster cluster1 = manager.getCluster(new ClusterInfo("def", 1, 1));
    YarnCluster cluster2 = manager.getCluster(new ClusterInfo("def", 2, 2));
    cluster1.start();
    cluster2.start();
    Configuration configuration1 = cluster1.getConfiguration();
    Configuration configuration2 = cluster2.getConfiguration();
   
    String rmAddress1 = configuration1.get(YarnConfiguration.RM_ADDRESS);
    String rmAddress2 = configuration2.get(YarnConfiguration.RM_ADDRESS);
   
    assertThat(rmAddress1, not(rmAddress2));
View Full Code Here

Examples of org.springframework.yarn.test.context.YarnCluster

  }

  @Test
  public void testTwoEquals() throws Exception {
    YarnClusterManager manager = YarnClusterManager.getInstance();
    YarnCluster cluster1 = manager.getCluster(new ClusterInfo("def", 1, 1));
    YarnCluster cluster2 = manager.getCluster(new ClusterInfo("def", 1, 1));
    cluster1.start();
    cluster2.start();
    Configuration configuration1 = cluster1.getConfiguration();
    Configuration configuration2 = cluster2.getConfiguration();
   
    String rmAddress1 = configuration1.get(YarnConfiguration.RM_ADDRESS);
    String rmAddress2 = configuration2.get(YarnConfiguration.RM_ADDRESS);
   
    assertThat(rmAddress1, is(rmAddress2));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.