public static void create(final Configuration configuration) { final SparkConf sparkConf = new SparkConf(); configuration .getKeys() .forEachRemaining(key -> sparkConf.set(key, configuration.getProperty(key).toString())); sparkConf.setAppName("Apache TinkerPop's Spark-Gremlin"); CONTEXT = SparkContext.getOrCreate(sparkConf); }
public static void create(final String master) { final SparkConf sparkConf = new SparkConf(); sparkConf.setAppName("Apache TinkerPop's Spark-Gremlin"); sparkConf.setMaster(master); CONTEXT = SparkContext.getOrCreate(sparkConf); }
@BeforeClass public static void setUp() { SparkConf sparkConf = new SparkConf().setMaster("local[*]").setAppName("SparkIT"); javaSparkContext = JavaSparkContext.fromSparkContext(SparkContext.getOrCreate(sparkConf)); }