Package org.apache.spark

Examples of org.apache.spark.SparkContext


  private final SparkContext originalSparkContext;

  public ScalaSparkContext() {
    super();
    this.originalSparkContext = new SparkContext(getSparkConf());
    originalSparkContext.addSparkListener(new SparkProgramListener());
  }
View Full Code Here


        assertThat(map2.get("two"), is("2"));
    }

    @Test
    public void testJavaFunctions() throws Exception {
        SparkContext sc = mock(SparkContext.class);
        SparkContextJavaFunctions scjf = javaFunctions(sc);
        assertThat(scjf.sparkContext, is(sc));
    }
View Full Code Here

        assertThat(scjf.sparkContext, is(sc));
    }

    @Test
    public void testJavaFunctions1() throws Exception {
        SparkContext sc = mock(SparkContext.class);
        JavaSparkContext jsc = mock(JavaSparkContext.class);
        when(jsc.sc()).thenReturn(sc);
        SparkContextJavaFunctions scjf = javaFunctions(jsc);
        assertThat(scjf.sparkContext, is(jsc.sc()));
    }
View Full Code Here

TOP

Related Classes of org.apache.spark.SparkContext

Copyright © 2018 www.massapicom. 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.