Examples of HadoopCluster


Examples of org.springframework.data.hadoop.test.context.HadoopCluster

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

Examples of org.springframework.data.hadoop.test.context.HadoopCluster

  private static String path3 = BASE + "file3";

  @Test
  public void testOneStandalone() throws Exception {
    HadoopClusterManager manager = HadoopClusterManager.getInstance();
    HadoopCluster cluster = manager.getCluster(new ClusterInfo());
    cluster.start();

    Configuration configuration = cluster.getConfiguration();
    assertThat(getHdfsUrl(configuration), startsWith("hdfs"));

    // these are not yet created
    checkFileNotExists(configuration, path1);
    checkFileNotExists(configuration, path2);
View Full Code Here

Examples of org.springframework.data.hadoop.test.context.HadoopCluster

  }

  @Test
  public void testTwoStandalone() throws Exception {
    HadoopClusterManager manager = HadoopClusterManager.getInstance();
    HadoopCluster cluster1 = manager.getCluster(new ClusterInfo("def", 1));
    HadoopCluster cluster2 = manager.getCluster(new ClusterInfo("def", 2));
    cluster1.start();
    cluster2.start();
    Configuration configuration1 = cluster1.getConfiguration();
    Configuration configuration2 = cluster2.getConfiguration();
    assertThat(getHdfsUrl(configuration1), startsWith("hdfs"));
    assertThat(getHdfsUrl(configuration2), startsWith("hdfs"));

    String fsUri1 = getHdfsUrl(configuration1);
    String fsUri2 = getHdfsUrl(configuration2);
View Full Code Here

Examples of org.springframework.data.hadoop.test.context.HadoopCluster

  }

  @Test
  public void testTwoEquals() throws Exception {
    HadoopClusterManager manager = HadoopClusterManager.getInstance();
    HadoopCluster cluster1 = manager.getCluster(new ClusterInfo("def", 1));
    HadoopCluster cluster2 = manager.getCluster(new ClusterInfo("def", 1));
    cluster1.start();
    cluster2.start();
    Configuration configuration1 = cluster1.getConfiguration();
    Configuration configuration2 = cluster2.getConfiguration();
    assertThat(getHdfsUrl(configuration1), startsWith("hdfs"));
    assertThat(getHdfsUrl(configuration2), startsWith("hdfs"));

    String fsUri1 = getHdfsUrl(configuration1);
    String fsUri2 = getHdfsUrl(configuration2);
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.