SlideShare uma empresa Scribd logo
1 de 5
Apache Spark: notions importantes
• RDD (Resilient Distributed Datasets): une table dans une base de données
– réarranger les calculs et d’optimiser le traitement (c-a-d: données sont divisés en partitions et peuvent être
stockés dans la mémoire sur les nœuds workers du cluster spark)
– tolérants aux pannes (c-a-d: un RDD sait comment recréer et recalculer son ensemble de données)
– Les RDD sont immutables (c-a-d: Pour obtenir une modification d’un RDD, il faut y appliquer une transformation, qui
retournera un nouveau RDD, l’original restera inchangé)
• DAG (Directed Acyclic Graph)
– Direct - La transformation est une action qui fait passer l'état de la partition de A à B.
– Acyclic -Transformation ne peut pas retourner à l'ancienne partition
– C’est une séquence de calculs effectuée sur des données où chaque nœud est une partition
RDD et un front est une transformation au-dessus des données.
• Les transformations
– prend juste un RDD et retourne un nouveau RDD
– par exemple map, filter, flatMap, groupByKey, reduceByKey, aggregateByKey, pipe (ex:
dataRDD.pipe("/home/hadoop/echo.sh")) et coalesce (= repartition())
• Les actions
– les actions évaluent et retournent une nouvelle valeur
– par exemple reduce, collect, count, first, take, countByKey et foreach
Page 1
Spark en Python
Page 2 – CVSP 12 sept 2017 - CAAPIC
Comment ça marche
1. Le code soumis contenant des transformations RDDs forme un
graphe acyclique direct (DAG) qui est ensuite divisé en étapes de
tâches par DAGScheduler.
2. Une étape est composée de tâches basées sur des partitions des
données d'entrée.
3. Les tâches sont planifiées par TaskScheduler afin de maximiser leur
traitement parallèle et optimisé.
4. Cluster Manager (en Standalone dans notre cas) envoient les tâches
planifiés aux workers pour les exécuter.
Page 3
Implémentation
• Composants
– Un master – Spark Driver
– Trois workers
– Un client to soumettre l’application en Python
• Bibliothèques
– Python 3.6
– Docker 17.03.1
– Pyspark 2.2.0
– Pybuilder 0.9
– Spark 2.2.0
– Java 8
• Déploiement
– Gestion de cluster en mode Standalone
– Docker composer
– Gitlab: https://gitlab.assurances.group.gca/AAD/demo-spark
Page 4
Démo
Page 5

Mais conteúdo relacionado

Semelhante a Spark docker

Cours Big Data Chap4 - Spark
Cours Big Data Chap4 - SparkCours Big Data Chap4 - Spark
Cours Big Data Chap4 - SparkAmal Abid
 
Hadoop Introduction in Paris
Hadoop Introduction in ParisHadoop Introduction in Paris
Hadoop Introduction in ParisTed Drake
 
Spark RDD : Transformations & Actions
Spark RDD : Transformations & ActionsSpark RDD : Transformations & Actions
Spark RDD : Transformations & ActionsMICHRAFY MUSTAFA
 
Spark (v1.3) - Présentation (Français)
Spark (v1.3) - Présentation (Français)Spark (v1.3) - Présentation (Français)
Spark (v1.3) - Présentation (Français)Alexis Seigneurin
 
Presentation des outils traitements distribues
Presentation des outils traitements distribuesPresentation des outils traitements distribues
Presentation des outils traitements distribuesLê Anh
 
Spark - An In-Memory Distributed Computing Engine.pptx
Spark - An In-Memory Distributed Computing Engine.pptxSpark - An In-Memory Distributed Computing Engine.pptx
Spark - An In-Memory Distributed Computing Engine.pptxAnass Nabil
 
ch2-hadoop-L3-2023-4p (1).pdf
ch2-hadoop-L3-2023-4p (1).pdfch2-hadoop-L3-2023-4p (1).pdf
ch2-hadoop-L3-2023-4p (1).pdfsalmanakbi
 
Architecture Big Data open source S.M.A.C.K
Architecture Big Data open source S.M.A.C.KArchitecture Big Data open source S.M.A.C.K
Architecture Big Data open source S.M.A.C.KJulien Anguenot
 
Spark - au dela du dataframe avec Tungsten et Catalyst
Spark - au dela du dataframe avec Tungsten et CatalystSpark - au dela du dataframe avec Tungsten et Catalyst
Spark - au dela du dataframe avec Tungsten et CatalystMathieu Goeminne
 
PerfUG - Hadoop Performances
PerfUG - Hadoop PerformancesPerfUG - Hadoop Performances
PerfUG - Hadoop PerformancesSofian Djamaa
 
Java 8 - collections et stream
Java 8 - collections et streamJava 8 - collections et stream
Java 8 - collections et streamFranck SIMON
 
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017)
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017) Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017)
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017) univalence
 
Spark SQL principes et fonctions
Spark SQL principes et fonctionsSpark SQL principes et fonctions
Spark SQL principes et fonctionsMICHRAFY MUSTAFA
 
Apache Cassandra - Concepts et fonctionnalités
Apache Cassandra - Concepts et fonctionnalitésApache Cassandra - Concepts et fonctionnalités
Apache Cassandra - Concepts et fonctionnalitésRomain Hardouin
 

Semelhante a Spark docker (20)

Tech day hadoop, Spark
Tech day hadoop, SparkTech day hadoop, Spark
Tech day hadoop, Spark
 
Cours Big Data Chap4 - Spark
Cours Big Data Chap4 - SparkCours Big Data Chap4 - Spark
Cours Big Data Chap4 - Spark
 
Hadoop Introduction in Paris
Hadoop Introduction in ParisHadoop Introduction in Paris
Hadoop Introduction in Paris
 
Spark RDD : Transformations & Actions
Spark RDD : Transformations & ActionsSpark RDD : Transformations & Actions
Spark RDD : Transformations & Actions
 
Spark (v1.3) - Présentation (Français)
Spark (v1.3) - Présentation (Français)Spark (v1.3) - Présentation (Français)
Spark (v1.3) - Présentation (Français)
 
Spark - Ippevent 19-02-2015
Spark - Ippevent 19-02-2015Spark - Ippevent 19-02-2015
Spark - Ippevent 19-02-2015
 
Presentation des outils traitements distribues
Presentation des outils traitements distribuesPresentation des outils traitements distribues
Presentation des outils traitements distribues
 
Mapreduce
MapreduceMapreduce
Mapreduce
 
Spark - An In-Memory Distributed Computing Engine.pptx
Spark - An In-Memory Distributed Computing Engine.pptxSpark - An In-Memory Distributed Computing Engine.pptx
Spark - An In-Memory Distributed Computing Engine.pptx
 
Introduction Apche Spark
Introduction Apche SparkIntroduction Apche Spark
Introduction Apche Spark
 
ch2-hadoop-L3-2023-4p (1).pdf
ch2-hadoop-L3-2023-4p (1).pdfch2-hadoop-L3-2023-4p (1).pdf
ch2-hadoop-L3-2023-4p (1).pdf
 
Architecture Big Data open source S.M.A.C.K
Architecture Big Data open source S.M.A.C.KArchitecture Big Data open source S.M.A.C.K
Architecture Big Data open source S.M.A.C.K
 
Spark - au dela du dataframe avec Tungsten et Catalyst
Spark - au dela du dataframe avec Tungsten et CatalystSpark - au dela du dataframe avec Tungsten et Catalyst
Spark - au dela du dataframe avec Tungsten et Catalyst
 
PerfUG - Hadoop Performances
PerfUG - Hadoop PerformancesPerfUG - Hadoop Performances
PerfUG - Hadoop Performances
 
Java 8 - collections et stream
Java 8 - collections et streamJava 8 - collections et stream
Java 8 - collections et stream
 
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017)
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017) Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017)
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017)
 
Spark SQL principes et fonctions
Spark SQL principes et fonctionsSpark SQL principes et fonctions
Spark SQL principes et fonctions
 
MariaDB une base de donnees NewSQL
MariaDB une base de donnees NewSQLMariaDB une base de donnees NewSQL
MariaDB une base de donnees NewSQL
 
Apache Cassandra - Concepts et fonctionnalités
Apache Cassandra - Concepts et fonctionnalitésApache Cassandra - Concepts et fonctionnalités
Apache Cassandra - Concepts et fonctionnalités
 
Presentation Map Reduce
Presentation Map ReducePresentation Map Reduce
Presentation Map Reduce
 

Mais de Lê Anh

Automatic vs. human question answering over multimedia meeting recordings
Automatic vs. human question answering over multimedia meeting recordingsAutomatic vs. human question answering over multimedia meeting recordings
Automatic vs. human question answering over multimedia meeting recordingsLê Anh
 
Lap trinh java hieu qua
Lap trinh java hieu quaLap trinh java hieu qua
Lap trinh java hieu quaLê Anh
 
Cahier de charges
Cahier de chargesCahier de charges
Cahier de chargesLê Anh
 
Final report. nguyen ngoc anh.01.07.2013
Final report. nguyen ngoc anh.01.07.2013Final report. nguyen ngoc anh.01.07.2013
Final report. nguyen ngoc anh.01.07.2013Lê Anh
 
Lequocanh
LequocanhLequocanh
LequocanhLê Anh
 
These lequocanh v7
These lequocanh v7These lequocanh v7
These lequocanh v7Lê Anh
 
Applying Computer Vision to Traffic Monitoring System in Vietnam
Applying Computer Vision to Traffic Monitoring System in Vietnam Applying Computer Vision to Traffic Monitoring System in Vietnam
Applying Computer Vision to Traffic Monitoring System in Vietnam Lê Anh
 
Poster WACAI 2012
Poster WACAI 2012Poster WACAI 2012
Poster WACAI 2012Lê Anh
 
ICMI 2012 Workshop on gesture and speech production
ICMI 2012 Workshop on gesture and speech productionICMI 2012 Workshop on gesture and speech production
ICMI 2012 Workshop on gesture and speech productionLê Anh
 
Lecture Notes in Computer Science (LNCS)
Lecture Notes in Computer Science (LNCS)Lecture Notes in Computer Science (LNCS)
Lecture Notes in Computer Science (LNCS)Lê Anh
 
IEEE Humanoids 2011
IEEE Humanoids 2011IEEE Humanoids 2011
IEEE Humanoids 2011Lê Anh
 
ACII 2011, USA
ACII 2011, USAACII 2011, USA
ACII 2011, USALê Anh
 
ACM ICMI Workshop 2012
ACM ICMI Workshop 2012ACM ICMI Workshop 2012
ACM ICMI Workshop 2012Lê Anh
 
Mid-term thesis report
Mid-term thesis reportMid-term thesis report
Mid-term thesis reportLê Anh
 
Affective Computing and Intelligent Interaction (ACII 2011)
Affective Computing and Intelligent Interaction (ACII 2011)Affective Computing and Intelligent Interaction (ACII 2011)
Affective Computing and Intelligent Interaction (ACII 2011)Lê Anh
 
Nao Tech Day
Nao Tech DayNao Tech Day
Nao Tech DayLê Anh
 
Journée Inter-GDR ISIS et Robotique: Interaction Homme-Robot
Journée Inter-GDR ISIS et Robotique: Interaction Homme-RobotJournée Inter-GDR ISIS et Robotique: Interaction Homme-Robot
Journée Inter-GDR ISIS et Robotique: Interaction Homme-RobotLê Anh
 
Người Ảo
Người ẢoNgười Ảo
Người ẢoLê Anh
 

Mais de Lê Anh (18)

Automatic vs. human question answering over multimedia meeting recordings
Automatic vs. human question answering over multimedia meeting recordingsAutomatic vs. human question answering over multimedia meeting recordings
Automatic vs. human question answering over multimedia meeting recordings
 
Lap trinh java hieu qua
Lap trinh java hieu quaLap trinh java hieu qua
Lap trinh java hieu qua
 
Cahier de charges
Cahier de chargesCahier de charges
Cahier de charges
 
Final report. nguyen ngoc anh.01.07.2013
Final report. nguyen ngoc anh.01.07.2013Final report. nguyen ngoc anh.01.07.2013
Final report. nguyen ngoc anh.01.07.2013
 
Lequocanh
LequocanhLequocanh
Lequocanh
 
These lequocanh v7
These lequocanh v7These lequocanh v7
These lequocanh v7
 
Applying Computer Vision to Traffic Monitoring System in Vietnam
Applying Computer Vision to Traffic Monitoring System in Vietnam Applying Computer Vision to Traffic Monitoring System in Vietnam
Applying Computer Vision to Traffic Monitoring System in Vietnam
 
Poster WACAI 2012
Poster WACAI 2012Poster WACAI 2012
Poster WACAI 2012
 
ICMI 2012 Workshop on gesture and speech production
ICMI 2012 Workshop on gesture and speech productionICMI 2012 Workshop on gesture and speech production
ICMI 2012 Workshop on gesture and speech production
 
Lecture Notes in Computer Science (LNCS)
Lecture Notes in Computer Science (LNCS)Lecture Notes in Computer Science (LNCS)
Lecture Notes in Computer Science (LNCS)
 
IEEE Humanoids 2011
IEEE Humanoids 2011IEEE Humanoids 2011
IEEE Humanoids 2011
 
ACII 2011, USA
ACII 2011, USAACII 2011, USA
ACII 2011, USA
 
ACM ICMI Workshop 2012
ACM ICMI Workshop 2012ACM ICMI Workshop 2012
ACM ICMI Workshop 2012
 
Mid-term thesis report
Mid-term thesis reportMid-term thesis report
Mid-term thesis report
 
Affective Computing and Intelligent Interaction (ACII 2011)
Affective Computing and Intelligent Interaction (ACII 2011)Affective Computing and Intelligent Interaction (ACII 2011)
Affective Computing and Intelligent Interaction (ACII 2011)
 
Nao Tech Day
Nao Tech DayNao Tech Day
Nao Tech Day
 
Journée Inter-GDR ISIS et Robotique: Interaction Homme-Robot
Journée Inter-GDR ISIS et Robotique: Interaction Homme-RobotJournée Inter-GDR ISIS et Robotique: Interaction Homme-Robot
Journée Inter-GDR ISIS et Robotique: Interaction Homme-Robot
 
Người Ảo
Người ẢoNgười Ảo
Người Ảo
 

Spark docker

  • 1. Apache Spark: notions importantes • RDD (Resilient Distributed Datasets): une table dans une base de données – réarranger les calculs et d’optimiser le traitement (c-a-d: données sont divisés en partitions et peuvent être stockés dans la mémoire sur les nœuds workers du cluster spark) – tolérants aux pannes (c-a-d: un RDD sait comment recréer et recalculer son ensemble de données) – Les RDD sont immutables (c-a-d: Pour obtenir une modification d’un RDD, il faut y appliquer une transformation, qui retournera un nouveau RDD, l’original restera inchangé) • DAG (Directed Acyclic Graph) – Direct - La transformation est une action qui fait passer l'état de la partition de A à B. – Acyclic -Transformation ne peut pas retourner à l'ancienne partition – C’est une séquence de calculs effectuée sur des données où chaque nœud est une partition RDD et un front est une transformation au-dessus des données. • Les transformations – prend juste un RDD et retourne un nouveau RDD – par exemple map, filter, flatMap, groupByKey, reduceByKey, aggregateByKey, pipe (ex: dataRDD.pipe("/home/hadoop/echo.sh")) et coalesce (= repartition()) • Les actions – les actions évaluent et retournent une nouvelle valeur – par exemple reduce, collect, count, first, take, countByKey et foreach Page 1
  • 2. Spark en Python Page 2 – CVSP 12 sept 2017 - CAAPIC
  • 3. Comment ça marche 1. Le code soumis contenant des transformations RDDs forme un graphe acyclique direct (DAG) qui est ensuite divisé en étapes de tâches par DAGScheduler. 2. Une étape est composée de tâches basées sur des partitions des données d'entrée. 3. Les tâches sont planifiées par TaskScheduler afin de maximiser leur traitement parallèle et optimisé. 4. Cluster Manager (en Standalone dans notre cas) envoient les tâches planifiés aux workers pour les exécuter. Page 3
  • 4. Implémentation • Composants – Un master – Spark Driver – Trois workers – Un client to soumettre l’application en Python • Bibliothèques – Python 3.6 – Docker 17.03.1 – Pyspark 2.2.0 – Pybuilder 0.9 – Spark 2.2.0 – Java 8 • Déploiement – Gestion de cluster en mode Standalone – Docker composer – Gitlab: https://gitlab.assurances.group.gca/AAD/demo-spark Page 4

Notas do Editor

  1. Keep in mind that repartitioning your data is a fairly expensive operation. Spark also has an optimized version of repartition() called coalesce() that allows avoiding data movement, but only if you are decreasing the number of RDD partitions. Pipe operator in Spark, allows developer to process RDD data using external applications.