Difference between revisions of "GPU621/Apache Spark Fall 2022"

From CDOT Wiki
Jump to: navigation, search
(Apache Spark Core API)
(Spark Installation Using Maven)
Line 5: Line 5:
  
 
===Spark Installation Using Maven===
 
===Spark Installation Using Maven===
An Apache Spark application can be easily instantiated using Maven. To add the required libraries, you can copy and paste the following code in the "pom.xml".
+
An Apache Spark application can be easily instantiated using Maven. To add the required libraries, you can copy and paste the following code into the "pom.xml".
 
 
<?xml version="1.0" encoding="UTF-8"?>
 
<project xmlns="http://maven.apache.org/POM/4.0.0"
 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
    <modelVersion>4.0.0</modelVersion>
 
 
 
    <groupId>org.example</groupId>
 
    <artifactId>Spark11</artifactId>
 
    <version>1.0-SNAPSHOT</version>
 
  
 
     <properties>
 
     <properties>
Line 38: Line 28:
 
         </dependency>
 
         </dependency>
 
     </dependencies>
 
     </dependencies>
</project>
 
  
 
==Deploy Apache Spark Application On AWS==
 
==Deploy Apache Spark Application On AWS==

Revision as of 23:15, 29 November 2022

Apache Spark

Apache Spark Core API

RDD Overview

One of the most important concepts in Spark is a resilient distributed dataset (RDD). RDD is a collection of elements partitioned across the nodes of the cluster that can be operated in parallel. RDDs are created by starting with a file, or an existing Java collection in the driver program, and transforming it.

Spark Installation Using Maven

An Apache Spark application can be easily instantiated using Maven. To add the required libraries, you can copy and paste the following code into the "pom.xml".

   <properties>
       <maven.compiler.source>11</maven.compiler.source>
       <maven.compiler.target>11</maven.compiler.target>
   </properties>
   <dependencies>
       <dependency>
           <groupId>org.apache.spark</groupId>
           <artifactId>spark-core_2.10</artifactId>
           <version>2.2.0</version>
       </dependency>
       <dependency>
           <groupId>org.apache.spark</groupId>
           <artifactId>spark-sql_2.10</artifactId>
           <version>2.2.0</version>
       </dependency>
       <dependency>
           <groupId>org.apache.hadoop</groupId>
           <artifactId>hadoop-hdfs</artifactId>
           <version>2.2.0</version>
       </dependency>
   </dependencies>

Deploy Apache Spark Application On AWS