SlideShare une entreprise Scribd logo
1  sur  26
Apache Giraph
MRINI YOUSSEF
BOUHILA BILAL
Introduction
 Apache Giraph est un projet qui performe des calculs sur les graphes,
 Apache Giraph utilise le service MapReduce de Hadoop.
 Apache Giraph a été inspiré par le Framework Pregel de Google
 Giraph est utilisé par Facebook et Paypal
Pourquoi on n’en a besoin ?
 Giraph fait éviter des dépenses onéreuses en mémoire et en réseau pour
des opérations mandataires en MapReude,
 Chaque cycle d’une itération de calcule sur Hadoop signifie l’execution
d’un Job MapReduce
Le Web
Le World Wide Web peut être structuré comme un énorme graphe:
 Les pages sont des sommets connectées par des arcs qui représentent les
hyperliens .
 Ce Web Graphe a des billions de sommets et d’arcs.
Le succès des plus grandes sociétés comme Google se résume à son habilité à
opérer de grands calculs sur ces graphes
Google PageRank
 Le succès de moteur de recherche Google est par son habilité à gérer le
classement des résultats.
 Le classement basé sur l’algorithme PageRank qui est un algorithme
orienté graphe très important:
 Les pages importantes ont beaucoup de
Lien provenant d’autres pages
Social Networks
 Sur Facebook, Twitter, Linkedin, les utilisateurs et leurs interactions
forment une Social Graph:
 Les utilisateurs sont les sommets connectés par des arcs qui représentent
une interaction comme Friendship ou Following
Google Pregel
 Un système distribué développé pour le traitement des graphes à grands
echelles « Think like a vertex »
 Il prend le Bulk Synchronous parallel comme execution
 Tres tolerant aux pannes by checkpointing
Pourrais je utiliser Pregel ?
 Pregel est la propriété de Google, comme alternative il existe Apache
Giraph qui est une implémentation de Pregel
 Elle tourne sous une infrastructure Hadoop
 Les calculs s’executent en mémoire
Bulk synchronous parellel
 SuperSteps
 Communication:
Les processus d’échanges de données entre eux afin de faciliter le controle
des données stockées
 Barrier synchronisation
Quand un processus atteind le point ( Barrière), il doit attendre que les autres
processus atteignent la meme barrière.
 Les calcules finissent quand tous les composants finissent.
Pourquoi ne pas implémenter Giraph
avec des MapReduce Jobs
 Trop de disques, pas assez de mémoire, a superstep become a Job
Qui fait quoi ?
 Master: Responsable de la coordination
Assigne les partitions aux Workers
Coordonne la synchronisation
 Worker : Responsable des sommets
Invoque les sommets actives
Envoie, reçoit et assigne les messages
Super Steps
 Chaque sommet a un id, une valeur et une liste de voisins adjacents et leurs arcs
correspondants.
 Chaque sommet est invoqué dans chaque super Step et peut recalculer sa valeur et renvoyer
des messages aux autres nœuds
 Des combinaisons, agrégations et les mutations de toplogies
Architecture maitre-esclave
 Les sommets sont partitionnés et assignés à des Workers
 Les maitres assignent et coordonnent alors que les Workers executent les
sommets et communiquent entre eux.
Les matrices
Installé Giraph sur Ubuntu
Taper les commandes suivantes:
sudo apt-get install git
sudo apt-get install maven
cd /usr/local
sudo git close https://github.com/apache/giraph.git
sudo chown –R user : hadoop giraph
Il faut modifier le fichier bashrc
gedit $HOME/.bashrc
Il faut ajouter la ligne suivante
export GIRAPH_HOME=/usr/local/giraph
Installé Giraph sur Ubuntu
 source $HOME/.bashrc
 cd $GIRAPH_HOME
 mvn package –DskipTests
 DskipTests permet de sauter la phase de teste, cela va prendre du temps
Installé Giraph sur Cloudera
 Il faut modifier le bashrc.
Export GIRAPH_HOME=/usr/local/giraph
Export GV=1.0.0
Export PRO= Hadoop_2.0.0
 Il faut charger les variables
Source ~/.bashrc
Installé Giraph sur Cloudera
 sudo mkdir /usr/local/giraph
 cd $GIRAPH_HOME
 cd ..
 sudo git clone https://github.com/apache/giraph.git
 sudo chown -R user:hadoop giraph
 cd $GIRAPH_HOME
 $ git checkout release-$GV
 $ mvn package -DskipTests -Dhadoop=non_secure -P $PRO
Installé Giraph sur Cloudera
Prépation de la donnée
 La premiere etape est de mettre notre graphe sur le hdfs sous le nom de
Tiny_graph.txt
 [0,0,[[1,1],[3,3]]]
[1,0,[[0,1],[2,2],[3,1]]]
[2,0,[[1,2],[4,4]]]
[3,0,[[0,3],[1,1],[4,4]]]
[4,0,[[3,4],[2,4]]]
 On va créer le fichier input et output sur le HDFS
Hdfs dfs –mkdir ginput
Hdfs dfs –mkdir goutput
 Ensuite on va copier notre tiny_graph dans le HDFS
Hdfs dfs –put tiny_graph.txt ginput
 Ensuite on va télécharger un exemple ( ShortestPathsInputGraph)
sudo yum install wget
wget http://ece.northwestern.edu/~aching/shortestPathsInputGraph.tar.gz
tar zxvf shortestPathsInputGraph.tar.gz
hdfs dfs -put shortestPathsInputGraph ginput
Executer le Giraph Job
hadoop jar giraph-ex.jar org.apache.giraph.GiraphRunner -Dgiraph.zkList=127.0.0.1:2181 -libjars
giraph-core.jar 
org.apache.giraph.examples.SimpleShortestPathsVertex 
-vif org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat 
-vip /user/training/ginput/tiny_graph.txt 
-of org.apache.giraph.io.formats.IdWithValueTextOutputFormat 
-op /user/training/goutput/shortestpathsC2 -ca SimpleShortestPathsVertex
org.apache.giraph.GiraphRunner
 Classe utilisé pour démarrer les exemples
org.apache.giraph.examples.SimpleShortestPathsComputation
 Dans ce cas il va calculer le chemin le plus court
-ca mapred.job.tracker=headnodehost:9010
 Nœud principale du Cluster
-vif org.apache.giraph.io;formats.JsonLongDoubleFloatDoubleVertexInputFormat
 Fomat d’entrée à utiliser pour les données en entrée
-vip /tiny_Graph,Text
 Fichier de donnée en entrée
-vof org.apache.io.formats.IdWithValueTextOutPutFomart
 Format de sortie
-op /example/outpout/.shortestspaths
 Emplacement de sortie
-w 2
 Le nombre de Worker
 Une fois la tache terminée il faut visualiser ces fichiers
hdfs dfs -text /example/output/shortestpaths/
 On aura le résultat suivant
0 1.0
4 5.0
2 2 .0
1 0.0
3 1.0
Vous pourrez visualisé l’éxecution de tous ces services plus en détails sur
notre prochain exposé qui portera sur l’utilisation de HD Insights sur Azure.

Contenu connexe

Tendances

Hive + Tez: A Performance Deep Dive
Hive + Tez: A Performance Deep DiveHive + Tez: A Performance Deep Dive
Hive + Tez: A Performance Deep Dive
DataWorks Summit
 

Tendances (20)

Hive + Tez: A Performance Deep Dive
Hive + Tez: A Performance Deep DiveHive + Tez: A Performance Deep Dive
Hive + Tez: A Performance Deep Dive
 
Powering Custom Apps at Facebook using Spark Script Transformation
Powering Custom Apps at Facebook using Spark Script TransformationPowering Custom Apps at Facebook using Spark Script Transformation
Powering Custom Apps at Facebook using Spark Script Transformation
 
Hadoop & Spark Performance tuning using Dr. Elephant
Hadoop & Spark Performance tuning using Dr. ElephantHadoop & Spark Performance tuning using Dr. Elephant
Hadoop & Spark Performance tuning using Dr. Elephant
 
Triton and symbolic execution on gdb
Triton and symbolic execution on gdbTriton and symbolic execution on gdb
Triton and symbolic execution on gdb
 
Graph database
Graph databaseGraph database
Graph database
 
Spring batch for large enterprises operations
Spring batch for large enterprises operations Spring batch for large enterprises operations
Spring batch for large enterprises operations
 
Spark overview
Spark overviewSpark overview
Spark overview
 
CEP - simplified streaming architecture - Strata Singapore 2016
CEP - simplified streaming architecture - Strata Singapore 2016CEP - simplified streaming architecture - Strata Singapore 2016
CEP - simplified streaming architecture - Strata Singapore 2016
 
Building a SIMD Supported Vectorized Native Engine for Spark SQL
Building a SIMD Supported Vectorized Native Engine for Spark SQLBuilding a SIMD Supported Vectorized Native Engine for Spark SQL
Building a SIMD Supported Vectorized Native Engine for Spark SQL
 
LUT-Network その後の話(2022/05/07)
LUT-Network その後の話(2022/05/07)LUT-Network その後の話(2022/05/07)
LUT-Network その後の話(2022/05/07)
 
Extending Machine Learning Algorithms with PySpark
Extending Machine Learning Algorithms with PySparkExtending Machine Learning Algorithms with PySpark
Extending Machine Learning Algorithms with PySpark
 
How to Extend Apache Spark with Customized Optimizations
How to Extend Apache Spark with Customized OptimizationsHow to Extend Apache Spark with Customized Optimizations
How to Extend Apache Spark with Customized Optimizations
 
NiFi Developer Guide
NiFi Developer GuideNiFi Developer Guide
NiFi Developer Guide
 
6.hive
6.hive6.hive
6.hive
 
Using Hadoop and Hive to Optimize Travel Search , WindyCityDB 2010
Using Hadoop and Hive to Optimize Travel Search, WindyCityDB 2010Using Hadoop and Hive to Optimize Travel Search, WindyCityDB 2010
Using Hadoop and Hive to Optimize Travel Search , WindyCityDB 2010
 
Hive Anatomy
Hive AnatomyHive Anatomy
Hive Anatomy
 
Building Next-Generation Web APIs with JSON-LD and Hydra
Building Next-Generation Web APIs with JSON-LD and HydraBuilding Next-Generation Web APIs with JSON-LD and Hydra
Building Next-Generation Web APIs with JSON-LD and Hydra
 
Angular 2.0
Angular  2.0Angular  2.0
Angular 2.0
 
JavaOne 2013: Memory Efficient Java
JavaOne 2013: Memory Efficient JavaJavaOne 2013: Memory Efficient Java
JavaOne 2013: Memory Efficient Java
 
Improving Python and Spark Performance and Interoperability: Spark Summit Eas...
Improving Python and Spark Performance and Interoperability: Spark Summit Eas...Improving Python and Spark Performance and Interoperability: Spark Summit Eas...
Improving Python and Spark Performance and Interoperability: Spark Summit Eas...
 

En vedette

Graph Sample and Hold: A Framework for Big Graph Analytics
Graph Sample and Hold: A Framework for Big Graph AnalyticsGraph Sample and Hold: A Framework for Big Graph Analytics
Graph Sample and Hold: A Framework for Big Graph Analytics
Nesreen K. Ahmed
 
Improving personalized recommendations through temporal overlapping community...
Improving personalized recommendations through temporal overlapping community...Improving personalized recommendations through temporal overlapping community...
Improving personalized recommendations through temporal overlapping community...
Mani kandan
 
Dynamic Draph / Iterative Computation on Apache Giraph
Dynamic Draph / Iterative Computation on Apache GiraphDynamic Draph / Iterative Computation on Apache Giraph
Dynamic Draph / Iterative Computation on Apache Giraph
DataWorks Summit
 
GraphX: Graph analytics for insights about developer communities
GraphX: Graph analytics for insights about developer communitiesGraphX: Graph analytics for insights about developer communities
GraphX: Graph analytics for insights about developer communities
Paco Nathan
 
Martin Junghans – Gradoop: Scalable Graph Analytics with Apache Flink
Martin Junghans – Gradoop: Scalable Graph Analytics with Apache FlinkMartin Junghans – Gradoop: Scalable Graph Analytics with Apache Flink
Martin Junghans – Gradoop: Scalable Graph Analytics with Apache Flink
Flink Forward
 
Graph theory
Graph theoryGraph theory
Graph theory
Kumar
 
Machine Learning and GraphX
Machine Learning and GraphXMachine Learning and GraphX
Machine Learning and GraphX
Andy Petrella
 

En vedette (20)

2011.10.14 Apache Giraph - Hortonworks
2011.10.14 Apache Giraph - Hortonworks2011.10.14 Apache Giraph - Hortonworks
2011.10.14 Apache Giraph - Hortonworks
 
Graph Sample and Hold: A Framework for Big Graph Analytics
Graph Sample and Hold: A Framework for Big Graph AnalyticsGraph Sample and Hold: A Framework for Big Graph Analytics
Graph Sample and Hold: A Framework for Big Graph Analytics
 
Improving personalized recommendations through temporal overlapping community...
Improving personalized recommendations through temporal overlapping community...Improving personalized recommendations through temporal overlapping community...
Improving personalized recommendations through temporal overlapping community...
 
Fast, Scalable Graph Processing: Apache Giraph on YARN
Fast, Scalable Graph Processing: Apache Giraph on YARNFast, Scalable Graph Processing: Apache Giraph on YARN
Fast, Scalable Graph Processing: Apache Giraph on YARN
 
Apache Giraph: start analyzing graph relationships in your bigdata in 45 minu...
Apache Giraph: start analyzing graph relationships in your bigdata in 45 minu...Apache Giraph: start analyzing graph relationships in your bigdata in 45 minu...
Apache Giraph: start analyzing graph relationships in your bigdata in 45 minu...
 
Hadoop Graph Processing with Apache Giraph
Hadoop Graph Processing with Apache GiraphHadoop Graph Processing with Apache Giraph
Hadoop Graph Processing with Apache Giraph
 
Giraph at Hadoop Summit 2014
Giraph at Hadoop Summit 2014Giraph at Hadoop Summit 2014
Giraph at Hadoop Summit 2014
 
Graph Analytics for big data
Graph Analytics for big dataGraph Analytics for big data
Graph Analytics for big data
 
Dynamic Draph / Iterative Computation on Apache Giraph
Dynamic Draph / Iterative Computation on Apache GiraphDynamic Draph / Iterative Computation on Apache Giraph
Dynamic Draph / Iterative Computation on Apache Giraph
 
Graphs are everywhere! Distributed graph computing with Spark GraphX
Graphs are everywhere! Distributed graph computing with Spark GraphXGraphs are everywhere! Distributed graph computing with Spark GraphX
Graphs are everywhere! Distributed graph computing with Spark GraphX
 
Spark Concepts - Spark SQL, Graphx, Streaming
Spark Concepts - Spark SQL, Graphx, StreamingSpark Concepts - Spark SQL, Graphx, Streaming
Spark Concepts - Spark SQL, Graphx, Streaming
 
Graph Analytics
Graph AnalyticsGraph Analytics
Graph Analytics
 
An excursion into Graph Analytics with Apache Spark GraphX
An excursion into Graph Analytics with Apache Spark GraphXAn excursion into Graph Analytics with Apache Spark GraphX
An excursion into Graph Analytics with Apache Spark GraphX
 
GraphX: Graph analytics for insights about developer communities
GraphX: Graph analytics for insights about developer communitiesGraphX: Graph analytics for insights about developer communities
GraphX: Graph analytics for insights about developer communities
 
Community detection in graphs
Community detection in graphsCommunity detection in graphs
Community detection in graphs
 
Applying large scale text analytics with graph databases
Applying large scale text analytics with graph databasesApplying large scale text analytics with graph databases
Applying large scale text analytics with graph databases
 
Martin Junghans – Gradoop: Scalable Graph Analytics with Apache Flink
Martin Junghans – Gradoop: Scalable Graph Analytics with Apache FlinkMartin Junghans – Gradoop: Scalable Graph Analytics with Apache Flink
Martin Junghans – Gradoop: Scalable Graph Analytics with Apache Flink
 
GraphX: Graph Analytics in Apache Spark (AMPCamp 5, 2014-11-20)
GraphX: Graph Analytics in Apache Spark (AMPCamp 5, 2014-11-20)GraphX: Graph Analytics in Apache Spark (AMPCamp 5, 2014-11-20)
GraphX: Graph Analytics in Apache Spark (AMPCamp 5, 2014-11-20)
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Machine Learning and GraphX
Machine Learning and GraphXMachine Learning and GraphX
Machine Learning and GraphX
 

Similaire à Apache giraph

Aqui hadoop draft
Aqui hadoop draftAqui hadoop draft
Aqui hadoop draft
Eric Papet
 
Cy3902 formation-cloudera-developer-training-for-apache-hadoop
Cy3902 formation-cloudera-developer-training-for-apache-hadoopCy3902 formation-cloudera-developer-training-for-apache-hadoop
Cy3902 formation-cloudera-developer-training-for-apache-hadoop
CERTyou Formation
 
Mathias Herberts fait le retour d'expérience Hadoop au Crédit Mutuel Arkéa
Mathias Herberts fait le retour d'expérience Hadoop au Crédit Mutuel ArkéaMathias Herberts fait le retour d'expérience Hadoop au Crédit Mutuel Arkéa
Mathias Herberts fait le retour d'expérience Hadoop au Crédit Mutuel Arkéa
Modern Data Stack France
 
Cy3907 formation-cloudera-administrator-training-for-apache-hadoop
Cy3907 formation-cloudera-administrator-training-for-apache-hadoopCy3907 formation-cloudera-administrator-training-for-apache-hadoop
Cy3907 formation-cloudera-administrator-training-for-apache-hadoop
CERTyou Formation
 

Similaire à Apache giraph (20)

Annexe Big Data
Annexe Big DataAnnexe Big Data
Annexe Big Data
 
Hadoop MapReduce - OSDC FR 2009
Hadoop MapReduce - OSDC FR 2009Hadoop MapReduce - OSDC FR 2009
Hadoop MapReduce - OSDC FR 2009
 
Sahara : Hadoop as Service avec OpenStack
Sahara : Hadoop as Service avec OpenStackSahara : Hadoop as Service avec OpenStack
Sahara : Hadoop as Service avec OpenStack
 
Aqui hadoop draft
Aqui hadoop draftAqui hadoop draft
Aqui hadoop draft
 
Hadoop
HadoopHadoop
Hadoop
 
Présentation Hadoop SECURINETS INSAT (MAP & REDUCE )
Présentation Hadoop SECURINETS INSAT (MAP & REDUCE )Présentation Hadoop SECURINETS INSAT (MAP & REDUCE )
Présentation Hadoop SECURINETS INSAT (MAP & REDUCE )
 
Parallélisation d'algorithmes de graphes avec MapReduce sur un cluster d'ordi...
Parallélisation d'algorithmes de graphes avec MapReduce sur un cluster d'ordi...Parallélisation d'algorithmes de graphes avec MapReduce sur un cluster d'ordi...
Parallélisation d'algorithmes de graphes avec MapReduce sur un cluster d'ordi...
 
Cy3902 formation-cloudera-developer-training-for-apache-hadoop
Cy3902 formation-cloudera-developer-training-for-apache-hadoopCy3902 formation-cloudera-developer-training-for-apache-hadoop
Cy3902 formation-cloudera-developer-training-for-apache-hadoop
 
TP1 Big Data - MapReduce
TP1 Big Data - MapReduceTP1 Big Data - MapReduce
TP1 Big Data - MapReduce
 
Paris RailsCamp 2009
Paris RailsCamp 2009Paris RailsCamp 2009
Paris RailsCamp 2009
 
Petit-déjeuner OCTO : Hadoop, plateforme multi-tenant, à tout d'une grande !
Petit-déjeuner OCTO : Hadoop, plateforme multi-tenant, à tout d'une grande !Petit-déjeuner OCTO : Hadoop, plateforme multi-tenant, à tout d'une grande !
Petit-déjeuner OCTO : Hadoop, plateforme multi-tenant, à tout d'une grande !
 
Mathias Herberts fait le retour d'expérience Hadoop au Crédit Mutuel Arkéa
Mathias Herberts fait le retour d'expérience Hadoop au Crédit Mutuel ArkéaMathias Herberts fait le retour d'expérience Hadoop au Crédit Mutuel Arkéa
Mathias Herberts fait le retour d'expérience Hadoop au Crédit Mutuel Arkéa
 
DrupalCamp Nantes 2016 - Migrer un site Drupal 6 ou Drupal 7 vers Drupal 8
DrupalCamp Nantes 2016 - Migrer un site Drupal 6 ou Drupal 7 vers Drupal 8DrupalCamp Nantes 2016 - Migrer un site Drupal 6 ou Drupal 7 vers Drupal 8
DrupalCamp Nantes 2016 - Migrer un site Drupal 6 ou Drupal 7 vers Drupal 8
 
Casablanca Hadoop & Big Data Meetup - Introduction à Hadoop
Casablanca Hadoop & Big Data Meetup - Introduction à HadoopCasablanca Hadoop & Big Data Meetup - Introduction à Hadoop
Casablanca Hadoop & Big Data Meetup - Introduction à Hadoop
 
Cy3907 formation-cloudera-administrator-training-for-apache-hadoop
Cy3907 formation-cloudera-administrator-training-for-apache-hadoopCy3907 formation-cloudera-administrator-training-for-apache-hadoop
Cy3907 formation-cloudera-administrator-training-for-apache-hadoop
 
160813-technology-template-16x9.pptx
160813-technology-template-16x9.pptx160813-technology-template-16x9.pptx
160813-technology-template-16x9.pptx
 
Installation hadoopv2.7.4-amal abid
Installation hadoopv2.7.4-amal abidInstallation hadoopv2.7.4-amal abid
Installation hadoopv2.7.4-amal abid
 
Tech day hadoop, Spark
Tech day hadoop, SparkTech day hadoop, Spark
Tech day hadoop, Spark
 
Techday Arrow Group: Hadoop & le Big Data
Techday Arrow Group: Hadoop & le Big DataTechday Arrow Group: Hadoop & le Big Data
Techday Arrow Group: Hadoop & le Big Data
 
Meetup laravel
Meetup laravelMeetup laravel
Meetup laravel
 

Plus de Ibn Tofail University (10)

Système de recommandations de films
Système de recommandations de filmsSystème de recommandations de films
Système de recommandations de films
 
Dossier Sponsoring
Dossier Sponsoring Dossier Sponsoring
Dossier Sponsoring
 
Big data
Big dataBig data
Big data
 
Implémentation des principaux algorithmes de chiffrements en Java
Implémentation des principaux algorithmes de chiffrements en JavaImplémentation des principaux algorithmes de chiffrements en Java
Implémentation des principaux algorithmes de chiffrements en Java
 
Application d'analyses des Tweets
Application d'analyses des TweetsApplication d'analyses des Tweets
Application d'analyses des Tweets
 
Introducing project spartan
Introducing project spartanIntroducing project spartan
Introducing project spartan
 
Imagine cup maroc 2015
Imagine cup maroc 2015Imagine cup maroc 2015
Imagine cup maroc 2015
 
Youth spark Morocco
Youth spark MoroccoYouth spark Morocco
Youth spark Morocco
 
Reglement enactus fsk
Reglement enactus fskReglement enactus fsk
Reglement enactus fsk
 
Dossier de sponsoring SIFE FSK
Dossier de sponsoring SIFE FSKDossier de sponsoring SIFE FSK
Dossier de sponsoring SIFE FSK
 

Apache giraph

  • 2. Introduction  Apache Giraph est un projet qui performe des calculs sur les graphes,  Apache Giraph utilise le service MapReduce de Hadoop.  Apache Giraph a été inspiré par le Framework Pregel de Google  Giraph est utilisé par Facebook et Paypal
  • 3. Pourquoi on n’en a besoin ?  Giraph fait éviter des dépenses onéreuses en mémoire et en réseau pour des opérations mandataires en MapReude,  Chaque cycle d’une itération de calcule sur Hadoop signifie l’execution d’un Job MapReduce
  • 4. Le Web Le World Wide Web peut être structuré comme un énorme graphe:  Les pages sont des sommets connectées par des arcs qui représentent les hyperliens .  Ce Web Graphe a des billions de sommets et d’arcs. Le succès des plus grandes sociétés comme Google se résume à son habilité à opérer de grands calculs sur ces graphes
  • 5. Google PageRank  Le succès de moteur de recherche Google est par son habilité à gérer le classement des résultats.  Le classement basé sur l’algorithme PageRank qui est un algorithme orienté graphe très important:  Les pages importantes ont beaucoup de Lien provenant d’autres pages
  • 6. Social Networks  Sur Facebook, Twitter, Linkedin, les utilisateurs et leurs interactions forment une Social Graph:  Les utilisateurs sont les sommets connectés par des arcs qui représentent une interaction comme Friendship ou Following
  • 7. Google Pregel  Un système distribué développé pour le traitement des graphes à grands echelles « Think like a vertex »  Il prend le Bulk Synchronous parallel comme execution  Tres tolerant aux pannes by checkpointing
  • 8. Pourrais je utiliser Pregel ?  Pregel est la propriété de Google, comme alternative il existe Apache Giraph qui est une implémentation de Pregel  Elle tourne sous une infrastructure Hadoop  Les calculs s’executent en mémoire
  • 9. Bulk synchronous parellel  SuperSteps  Communication: Les processus d’échanges de données entre eux afin de faciliter le controle des données stockées  Barrier synchronisation Quand un processus atteind le point ( Barrière), il doit attendre que les autres processus atteignent la meme barrière.  Les calcules finissent quand tous les composants finissent.
  • 10. Pourquoi ne pas implémenter Giraph avec des MapReduce Jobs  Trop de disques, pas assez de mémoire, a superstep become a Job
  • 11. Qui fait quoi ?  Master: Responsable de la coordination Assigne les partitions aux Workers Coordonne la synchronisation  Worker : Responsable des sommets Invoque les sommets actives Envoie, reçoit et assigne les messages
  • 12. Super Steps  Chaque sommet a un id, une valeur et une liste de voisins adjacents et leurs arcs correspondants.  Chaque sommet est invoqué dans chaque super Step et peut recalculer sa valeur et renvoyer des messages aux autres nœuds  Des combinaisons, agrégations et les mutations de toplogies
  • 13. Architecture maitre-esclave  Les sommets sont partitionnés et assignés à des Workers  Les maitres assignent et coordonnent alors que les Workers executent les sommets et communiquent entre eux.
  • 15. Installé Giraph sur Ubuntu Taper les commandes suivantes: sudo apt-get install git sudo apt-get install maven cd /usr/local sudo git close https://github.com/apache/giraph.git sudo chown –R user : hadoop giraph Il faut modifier le fichier bashrc gedit $HOME/.bashrc Il faut ajouter la ligne suivante export GIRAPH_HOME=/usr/local/giraph
  • 16. Installé Giraph sur Ubuntu  source $HOME/.bashrc  cd $GIRAPH_HOME  mvn package –DskipTests  DskipTests permet de sauter la phase de teste, cela va prendre du temps
  • 17.
  • 18. Installé Giraph sur Cloudera  Il faut modifier le bashrc. Export GIRAPH_HOME=/usr/local/giraph Export GV=1.0.0 Export PRO= Hadoop_2.0.0  Il faut charger les variables Source ~/.bashrc
  • 19. Installé Giraph sur Cloudera  sudo mkdir /usr/local/giraph  cd $GIRAPH_HOME  cd ..  sudo git clone https://github.com/apache/giraph.git  sudo chown -R user:hadoop giraph  cd $GIRAPH_HOME  $ git checkout release-$GV  $ mvn package -DskipTests -Dhadoop=non_secure -P $PRO
  • 21. Prépation de la donnée  La premiere etape est de mettre notre graphe sur le hdfs sous le nom de Tiny_graph.txt  [0,0,[[1,1],[3,3]]] [1,0,[[0,1],[2,2],[3,1]]] [2,0,[[1,2],[4,4]]] [3,0,[[0,3],[1,1],[4,4]]] [4,0,[[3,4],[2,4]]]
  • 22.  On va créer le fichier input et output sur le HDFS Hdfs dfs –mkdir ginput Hdfs dfs –mkdir goutput  Ensuite on va copier notre tiny_graph dans le HDFS Hdfs dfs –put tiny_graph.txt ginput  Ensuite on va télécharger un exemple ( ShortestPathsInputGraph) sudo yum install wget wget http://ece.northwestern.edu/~aching/shortestPathsInputGraph.tar.gz tar zxvf shortestPathsInputGraph.tar.gz hdfs dfs -put shortestPathsInputGraph ginput
  • 23. Executer le Giraph Job hadoop jar giraph-ex.jar org.apache.giraph.GiraphRunner -Dgiraph.zkList=127.0.0.1:2181 -libjars giraph-core.jar org.apache.giraph.examples.SimpleShortestPathsVertex -vif org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat -vip /user/training/ginput/tiny_graph.txt -of org.apache.giraph.io.formats.IdWithValueTextOutputFormat -op /user/training/goutput/shortestpathsC2 -ca SimpleShortestPathsVertex
  • 24. org.apache.giraph.GiraphRunner  Classe utilisé pour démarrer les exemples org.apache.giraph.examples.SimpleShortestPathsComputation  Dans ce cas il va calculer le chemin le plus court -ca mapred.job.tracker=headnodehost:9010  Nœud principale du Cluster -vif org.apache.giraph.io;formats.JsonLongDoubleFloatDoubleVertexInputFormat  Fomat d’entrée à utiliser pour les données en entrée -vip /tiny_Graph,Text  Fichier de donnée en entrée -vof org.apache.io.formats.IdWithValueTextOutPutFomart  Format de sortie -op /example/outpout/.shortestspaths  Emplacement de sortie -w 2  Le nombre de Worker
  • 25.  Une fois la tache terminée il faut visualiser ces fichiers hdfs dfs -text /example/output/shortestpaths/  On aura le résultat suivant 0 1.0 4 5.0 2 2 .0 1 0.0 3 1.0
  • 26. Vous pourrez visualisé l’éxecution de tous ces services plus en détails sur notre prochain exposé qui portera sur l’utilisation de HD Insights sur Azure.