开发者学堂课程【大数据实时计算框架 Spark 快速入门:持久化策略_缓存优化_2】学习笔记,与课程紧密联系,让用户快速学习知识。
课程地址:https://developer.aliyun.com/learning/course/100/detail/1653
持久化策略_缓存优化_2
package com.bjsxt.spark;
import org.apache.spark. SparkConf;
import org.apache.spark.api.java. JavaRDD;
import org.apache.spark.api.java.JavaSparkContext;
public class TeststorageLevel {
public static void main(String[] args) {
SparkConf conf = new SparkConf().setMaster("local").setAppName("TestStorageLevel" );
JavaSparkContext sc = new JavaSparkContext(conf);
3avaRDD<String> text = sc.textFile("NASA_access_log_Aug95");
sc.close();
运行