Mapa mental
RDD-based programming

Contenido del mapa
RDD-based programming
SparkContext
- The "connection" of the driver to the cluster is based on the Spark Context object e.g. SparkConf conf = new SparkConf().setAppName("Applicationname"); JavaSparkContext sc = new JavaSparkContext(conf);
RDD
- A Spark RDD is an immutable distributed collection of objects, which allows parallelizing the code. Each RDD is split in partitions.
- RDD ceation
- By loading an external dataset
- from files
- e.g. JavaRDD<String> lines = sc.textFile(inputFile): can set the number of partitions: JavaRDD<String> lines = sc.textFile(inputFile, 5);
- from files
- By parallelizing a local collection created in the driver. e.g a java collection
- based on the "parallelize(List<T> list)"
- // create a local Java list List<String> inputList = Arrays.asList("First ele"...); // Build an RDD of Strings from the local list JavaRDD<String> distList = sc.parallelize(inputList); // number of partitions are set automatically by the spark if no parameter of numPartitions specifies in parallelize method
- based on the "parallelize(List<T> list)"
- By loading an external dataset
- Save RDD
- saveAsTextFile(String outputPath)
- RDD operations
- Transformations
- Actions
Imágenes y archivos del mapa
Información
- Descripción
- Mapa Mental sobre RDD-based programming, creado por 媛媛 李 el 13/05/2017.
- Creado por
- 媛媛 李
- Visitas
- 0
- Valoración