SlideShare a Scribd company logo
1 of 5
Download to read offline
Big Data, Spark and Python:
C/C++ Integration
Moshe Kaplan
moshe.kaplan@brightaqua.com
© All rights reserved: Moshe Kaplan
http://top-performance.blogspot.com
C++ Integration using PIPE
Compile Code:
/usr/bin/gcc -o /tmp/simple /tmp/simple.c
Copy Executable to central location (S3)
Distribute code to all nodes
Use pipe for integration
Clean the old code
2
>>> names = sc.parallelize(["Don", "Betty", "Sally"])
>>> piped = names.pipe("/tmp/simple")
>>> piped.collect()
© All rights reserved: Moshe Kaplan
http://top-performance.blogspot.com
General Concept: PySpark Internals
3
© All rights reserved: Moshe Kaplan
http://top-performance.blogspot.com
import os
import shutil
num_worker_nodes = 1
def copyFile(filepath):
shutil.copyfile("/dbfs%s" % filepath, filepath)
os.system("chmod u+x %s" % filepath)
sc.parallelize(range(0, 2 * (1 + num_worker_nodes)))
.map(lambda s: copyFile("/tmp/simple"))
.count()
C++: Copy code to nodes
4
© All rights reserved: Moshe Kaplan
http://top-performance.blogspot.com
Thank You !
Moshe Kaplan
moshe.kaplan@brightaqua.com

More Related Content

What's hot

Web 2 . 0 .0 Programming Companies
Web 2 . 0 .0 Programming CompaniesWeb 2 . 0 .0 Programming Companies
Web 2 . 0 .0 Programming Companiesebooker97
 
Beyond Lists - Functional Kats Conf Dublin 2015
Beyond Lists - Functional Kats Conf Dublin 2015Beyond Lists - Functional Kats Conf Dublin 2015
Beyond Lists - Functional Kats Conf Dublin 2015Phillip Trelford
 
Web 2 . .3 Development Services
Web 2 . .3 Development ServicesWeb 2 . .3 Development Services
Web 2 . .3 Development ServicesTheawaster485
 
Basicsof c make and git for a hello qt application
Basicsof c make and git for a hello qt applicationBasicsof c make and git for a hello qt application
Basicsof c make and git for a hello qt applicationDinesh Manajipet
 
Mikrotik and easy hotspot, as hotspot billing system
Mikrotik and easy hotspot, as hotspot billing systemMikrotik and easy hotspot, as hotspot billing system
Mikrotik and easy hotspot, as hotspot billing systemsedotabiz
 
Leveraging Intra-Node Parallelization in HPCC Systems
Leveraging Intra-Node Parallelization in HPCC SystemsLeveraging Intra-Node Parallelization in HPCC Systems
Leveraging Intra-Node Parallelization in HPCC SystemsHPCC Systems
 
In-Memory Database System Built for Speed and Scale
In-Memory Database System Built for Speed and ScaleIn-Memory Database System Built for Speed and Scale
In-Memory Database System Built for Speed and ScaleSingleStore
 

What's hot (11)

Web 2 . 0 .0 Programming Companies
Web 2 . 0 .0 Programming CompaniesWeb 2 . 0 .0 Programming Companies
Web 2 . 0 .0 Programming Companies
 
GoLang & GoatCore
GoLang & GoatCore GoLang & GoatCore
GoLang & GoatCore
 
Beyond Lists - Functional Kats Conf Dublin 2015
Beyond Lists - Functional Kats Conf Dublin 2015Beyond Lists - Functional Kats Conf Dublin 2015
Beyond Lists - Functional Kats Conf Dublin 2015
 
Web 2 . .3 Development Services
Web 2 . .3 Development ServicesWeb 2 . .3 Development Services
Web 2 . .3 Development Services
 
Basicsof c make and git for a hello qt application
Basicsof c make and git for a hello qt applicationBasicsof c make and git for a hello qt application
Basicsof c make and git for a hello qt application
 
Mikrotik and easy hotspot, as hotspot billing system
Mikrotik and easy hotspot, as hotspot billing systemMikrotik and easy hotspot, as hotspot billing system
Mikrotik and easy hotspot, as hotspot billing system
 
Org Beamer
Org BeamerOrg Beamer
Org Beamer
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
 
Leveraging Intra-Node Parallelization in HPCC Systems
Leveraging Intra-Node Parallelization in HPCC SystemsLeveraging Intra-Node Parallelization in HPCC Systems
Leveraging Intra-Node Parallelization in HPCC Systems
 
In-Memory Database System Built for Speed and Scale
In-Memory Database System Built for Speed and ScaleIn-Memory Database System Built for Speed and Scale
In-Memory Database System Built for Speed and Scale
 
MFC Menu
MFC MenuMFC Menu
MFC Menu
 

Viewers also liked

Laura Tanzer LB S17 Web-compressed
Laura Tanzer LB S17 Web-compressedLaura Tanzer LB S17 Web-compressed
Laura Tanzer LB S17 Web-compressedLaura Tanzer
 
Transition numérique des offices de tourisme, qui l'eût cru ? #rnn2016 @jbso...
Transition numérique des offices de tourisme, qui l'eût cru ? #rnn2016 @jbso...Transition numérique des offices de tourisme, qui l'eût cru ? #rnn2016 @jbso...
Transition numérique des offices de tourisme, qui l'eût cru ? #rnn2016 @jbso...Jean-Baptiste Soubaigné
 
Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...
Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...
Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...Severalnines
 
Redis training for java software engineers
Redis training for java software engineersRedis training for java software engineers
Redis training for java software engineersMoshe Kaplan
 
EDUCARNIVAL 2016 at IIT DELHI - Presentation by Himanshu Manglik
EDUCARNIVAL 2016 at IIT DELHI - Presentation by Himanshu ManglikEDUCARNIVAL 2016 at IIT DELHI - Presentation by Himanshu Manglik
EDUCARNIVAL 2016 at IIT DELHI - Presentation by Himanshu ManglikEduexcellence
 
Creating Big Data: Methodology
Creating Big Data: MethodologyCreating Big Data: Methodology
Creating Big Data: MethodologyMoshe Kaplan
 
Administrasi Pendidikan Bidang Garapan Personalia- oleh Meidita
Administrasi Pendidikan Bidang Garapan Personalia- oleh Meidita Administrasi Pendidikan Bidang Garapan Personalia- oleh Meidita
Administrasi Pendidikan Bidang Garapan Personalia- oleh Meidita Meidita Kurnia
 
Unveiling CERN Cloud Architecture - October, 2015
Unveiling CERN Cloud Architecture - October, 2015Unveiling CERN Cloud Architecture - October, 2015
Unveiling CERN Cloud Architecture - October, 2015Belmiro Moreira
 
Chapter8 International Finance Management
Chapter8 International Finance ManagementChapter8 International Finance Management
Chapter8 International Finance ManagementPiyush Gaur
 
Cern Cloud Architecture - February, 2016
Cern Cloud Architecture - February, 2016Cern Cloud Architecture - February, 2016
Cern Cloud Architecture - February, 2016Belmiro Moreira
 
2016 Future of Open Source Study
2016 Future of Open Source Study2016 Future of Open Source Study
2016 Future of Open Source StudyNorth Bridge
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境謝 宗穎
 

Viewers also liked (17)

Laura Tanzer LB S17 Web-compressed
Laura Tanzer LB S17 Web-compressedLaura Tanzer LB S17 Web-compressed
Laura Tanzer LB S17 Web-compressed
 
assignment_3_clinical_mental_health_771
assignment_3_clinical_mental_health_771assignment_3_clinical_mental_health_771
assignment_3_clinical_mental_health_771
 
tics
ticstics
tics
 
Transition numérique des offices de tourisme, qui l'eût cru ? #rnn2016 @jbso...
Transition numérique des offices de tourisme, qui l'eût cru ? #rnn2016 @jbso...Transition numérique des offices de tourisme, qui l'eût cru ? #rnn2016 @jbso...
Transition numérique des offices de tourisme, qui l'eût cru ? #rnn2016 @jbso...
 
Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...
Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...
Repair & Recovery for your MySQL, MariaDB & MongoDB / TokuMX Clusters - Webin...
 
Frasa adjektiva
Frasa adjektivaFrasa adjektiva
Frasa adjektiva
 
Redis training for java software engineers
Redis training for java software engineersRedis training for java software engineers
Redis training for java software engineers
 
EDUCARNIVAL 2016 at IIT DELHI - Presentation by Himanshu Manglik
EDUCARNIVAL 2016 at IIT DELHI - Presentation by Himanshu ManglikEDUCARNIVAL 2016 at IIT DELHI - Presentation by Himanshu Manglik
EDUCARNIVAL 2016 at IIT DELHI - Presentation by Himanshu Manglik
 
Creating Big Data: Methodology
Creating Big Data: MethodologyCreating Big Data: Methodology
Creating Big Data: Methodology
 
Administrasi Pendidikan Bidang Garapan Personalia- oleh Meidita
Administrasi Pendidikan Bidang Garapan Personalia- oleh Meidita Administrasi Pendidikan Bidang Garapan Personalia- oleh Meidita
Administrasi Pendidikan Bidang Garapan Personalia- oleh Meidita
 
DOSSIER
DOSSIERDOSSIER
DOSSIER
 
Unveiling CERN Cloud Architecture - October, 2015
Unveiling CERN Cloud Architecture - October, 2015Unveiling CERN Cloud Architecture - October, 2015
Unveiling CERN Cloud Architecture - October, 2015
 
Chapter8 International Finance Management
Chapter8 International Finance ManagementChapter8 International Finance Management
Chapter8 International Finance Management
 
PD Calibration - A Delicate Balancing Act
PD Calibration - A Delicate Balancing ActPD Calibration - A Delicate Balancing Act
PD Calibration - A Delicate Balancing Act
 
Cern Cloud Architecture - February, 2016
Cern Cloud Architecture - February, 2016Cern Cloud Architecture - February, 2016
Cern Cloud Architecture - February, 2016
 
2016 Future of Open Source Study
2016 Future of Open Source Study2016 Future of Open Source Study
2016 Future of Open Source Study
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
 

Similar to Spark and C Integration

Dev8d 2011-pipe2 py
Dev8d 2011-pipe2 pyDev8d 2011-pipe2 py
Dev8d 2011-pipe2 pyTony Hirst
 
Introduciton to Python
Introduciton to PythonIntroduciton to Python
Introduciton to PythonMoshe Kaplan
 
SECCOM 2017 - Conan.io o gerente de pacote para C e C++
SECCOM 2017 - Conan.io o gerente de pacote para C e C++SECCOM 2017 - Conan.io o gerente de pacote para C e C++
SECCOM 2017 - Conan.io o gerente de pacote para C e C++Uilian Ries
 
An Introduction to CMake
An Introduction to CMakeAn Introduction to CMake
An Introduction to CMakeICS
 
Facebook Glow Compiler のソースコードをグダグダ語る会
Facebook Glow Compiler のソースコードをグダグダ語る会Facebook Glow Compiler のソースコードをグダグダ語る会
Facebook Glow Compiler のソースコードをグダグダ語る会Mr. Vengineer
 
2016 05-cloudsoft-amp-and-brooklyn-new
2016 05-cloudsoft-amp-and-brooklyn-new2016 05-cloudsoft-amp-and-brooklyn-new
2016 05-cloudsoft-amp-and-brooklyn-newBradDesAulniers2
 
Contributing to an os project
Contributing to an os projectContributing to an os project
Contributing to an os projectLasse Schuirmann
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
Euro python2011 High Performance Python
Euro python2011 High Performance PythonEuro python2011 High Performance Python
Euro python2011 High Performance PythonIan Ozsvald
 
carrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-APIcarrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-APIYoni Davidson
 
Where's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind PloneWhere's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind PloneVincenzo Barone
 
C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...bhargavi804095
 
Introduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptxIntroduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptxNEHARAJPUT239591
 
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJIntroduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJmeharikiros2
 
Conan a C/C++ Package Manager
Conan a C/C++ Package ManagerConan a C/C++ Package Manager
Conan a C/C++ Package ManagerUilian Ries
 
Cooking environments with chef
Cooking environments with chefCooking environments with chef
Cooking environments with chefpythonandchips
 
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808Cisco DevNet
 

Similar to Spark and C Integration (20)

Dev8d 2011-pipe2 py
Dev8d 2011-pipe2 pyDev8d 2011-pipe2 py
Dev8d 2011-pipe2 py
 
Introduciton to Python
Introduciton to PythonIntroduciton to Python
Introduciton to Python
 
SECCOM 2017 - Conan.io o gerente de pacote para C e C++
SECCOM 2017 - Conan.io o gerente de pacote para C e C++SECCOM 2017 - Conan.io o gerente de pacote para C e C++
SECCOM 2017 - Conan.io o gerente de pacote para C e C++
 
An Introduction to CMake
An Introduction to CMakeAn Introduction to CMake
An Introduction to CMake
 
Facebook Glow Compiler のソースコードをグダグダ語る会
Facebook Glow Compiler のソースコードをグダグダ語る会Facebook Glow Compiler のソースコードをグダグダ語る会
Facebook Glow Compiler のソースコードをグダグダ語る会
 
Python at Facebook
Python at FacebookPython at Facebook
Python at Facebook
 
2016 05-cloudsoft-amp-and-brooklyn-new
2016 05-cloudsoft-amp-and-brooklyn-new2016 05-cloudsoft-amp-and-brooklyn-new
2016 05-cloudsoft-amp-and-brooklyn-new
 
Contributing to an os project
Contributing to an os projectContributing to an os project
Contributing to an os project
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Euro python2011 High Performance Python
Euro python2011 High Performance PythonEuro python2011 High Performance Python
Euro python2011 High Performance Python
 
carrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-APIcarrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-API
 
Where's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind PloneWhere's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind Plone
 
C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...
 
Introduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptxIntroduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptx
 
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJIntroduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
 
Capistrano
CapistranoCapistrano
Capistrano
 
Conan a C/C++ Package Manager
Conan a C/C++ Package ManagerConan a C/C++ Package Manager
Conan a C/C++ Package Manager
 
Introduction to cython
Introduction to cythonIntroduction to cython
Introduction to cython
 
Cooking environments with chef
Cooking environments with chefCooking environments with chef
Cooking environments with chef
 
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
 

More from Moshe Kaplan

Introduction to Big Data
Introduction to Big DataIntroduction to Big Data
Introduction to Big DataMoshe Kaplan
 
MongoDB training for java software engineers
MongoDB training for java software engineersMongoDB training for java software engineers
MongoDB training for java software engineersMoshe Kaplan
 
MongoDB from Basics to Scale
MongoDB from Basics to ScaleMongoDB from Basics to Scale
MongoDB from Basics to ScaleMoshe Kaplan
 
MongoDB Best Practices for Developers
MongoDB Best Practices for DevelopersMongoDB Best Practices for Developers
MongoDB Best Practices for DevelopersMoshe Kaplan
 
Scale and Cloud Design Patterns
Scale and Cloud Design PatternsScale and Cloud Design Patterns
Scale and Cloud Design PatternsMoshe Kaplan
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBMoshe Kaplan
 
Web systems architecture, Performance and More
Web systems architecture, Performance and MoreWeb systems architecture, Performance and More
Web systems architecture, Performance and MoreMoshe Kaplan
 
Do Big Data and NoSQL Fit Your Needs?
Do Big Data and NoSQL Fit Your Needs?Do Big Data and NoSQL Fit Your Needs?
Do Big Data and NoSQL Fit Your Needs?Moshe Kaplan
 
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...Moshe Kaplan
 
MySQL Multi Master Replication
MySQL Multi Master ReplicationMySQL Multi Master Replication
MySQL Multi Master ReplicationMoshe Kaplan
 
mongoDB Performance
mongoDB PerformancemongoDB Performance
mongoDB PerformanceMoshe Kaplan
 
Web Systems Architecture by Moshe Kaplan
Web Systems Architecture by Moshe KaplanWeb Systems Architecture by Moshe Kaplan
Web Systems Architecture by Moshe KaplanMoshe Kaplan
 
Big Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuff
Big Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuffBig Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuff
Big Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuffMoshe Kaplan
 
MySQL crash course by moshe kaplan
MySQL crash course by moshe kaplanMySQL crash course by moshe kaplan
MySQL crash course by moshe kaplanMoshe Kaplan
 
VP R&D Open Seminar: Caching
VP R&D Open Seminar: CachingVP R&D Open Seminar: Caching
VP R&D Open Seminar: CachingMoshe Kaplan
 
Expert Days: The VP R&D Open Seminar: Project Management
Expert Days: The VP R&D Open Seminar: Project ManagementExpert Days: The VP R&D Open Seminar: Project Management
Expert Days: The VP R&D Open Seminar: Project ManagementMoshe Kaplan
 
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar Moshe Kaplan
 

More from Moshe Kaplan (20)

Introduction to Big Data
Introduction to Big DataIntroduction to Big Data
Introduction to Big Data
 
Git Tutorial
Git TutorialGit Tutorial
Git Tutorial
 
MongoDB training for java software engineers
MongoDB training for java software engineersMongoDB training for java software engineers
MongoDB training for java software engineers
 
MongoDB from Basics to Scale
MongoDB from Basics to ScaleMongoDB from Basics to Scale
MongoDB from Basics to Scale
 
MongoDB Best Practices for Developers
MongoDB Best Practices for DevelopersMongoDB Best Practices for Developers
MongoDB Best Practices for Developers
 
The api economy
The api economyThe api economy
The api economy
 
Big Data Workshop
Big Data WorkshopBig Data Workshop
Big Data Workshop
 
Scale and Cloud Design Patterns
Scale and Cloud Design PatternsScale and Cloud Design Patterns
Scale and Cloud Design Patterns
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Web systems architecture, Performance and More
Web systems architecture, Performance and MoreWeb systems architecture, Performance and More
Web systems architecture, Performance and More
 
Do Big Data and NoSQL Fit Your Needs?
Do Big Data and NoSQL Fit Your Needs?Do Big Data and NoSQL Fit Your Needs?
Do Big Data and NoSQL Fit Your Needs?
 
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
 
MySQL Multi Master Replication
MySQL Multi Master ReplicationMySQL Multi Master Replication
MySQL Multi Master Replication
 
mongoDB Performance
mongoDB PerformancemongoDB Performance
mongoDB Performance
 
Web Systems Architecture by Moshe Kaplan
Web Systems Architecture by Moshe KaplanWeb Systems Architecture by Moshe Kaplan
Web Systems Architecture by Moshe Kaplan
 
Big Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuff
Big Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuffBig Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuff
Big Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuff
 
MySQL crash course by moshe kaplan
MySQL crash course by moshe kaplanMySQL crash course by moshe kaplan
MySQL crash course by moshe kaplan
 
VP R&D Open Seminar: Caching
VP R&D Open Seminar: CachingVP R&D Open Seminar: Caching
VP R&D Open Seminar: Caching
 
Expert Days: The VP R&D Open Seminar: Project Management
Expert Days: The VP R&D Open Seminar: Project ManagementExpert Days: The VP R&D Open Seminar: Project Management
Expert Days: The VP R&D Open Seminar: Project Management
 
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
 

Recently uploaded

Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Recently uploaded (20)

Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

Spark and C Integration

  • 1. Big Data, Spark and Python: C/C++ Integration Moshe Kaplan moshe.kaplan@brightaqua.com
  • 2. © All rights reserved: Moshe Kaplan http://top-performance.blogspot.com C++ Integration using PIPE Compile Code: /usr/bin/gcc -o /tmp/simple /tmp/simple.c Copy Executable to central location (S3) Distribute code to all nodes Use pipe for integration Clean the old code 2 >>> names = sc.parallelize(["Don", "Betty", "Sally"]) >>> piped = names.pipe("/tmp/simple") >>> piped.collect()
  • 3. © All rights reserved: Moshe Kaplan http://top-performance.blogspot.com General Concept: PySpark Internals 3
  • 4. © All rights reserved: Moshe Kaplan http://top-performance.blogspot.com import os import shutil num_worker_nodes = 1 def copyFile(filepath): shutil.copyfile("/dbfs%s" % filepath, filepath) os.system("chmod u+x %s" % filepath) sc.parallelize(range(0, 2 * (1 + num_worker_nodes))) .map(lambda s: copyFile("/tmp/simple")) .count() C++: Copy code to nodes 4
  • 5. © All rights reserved: Moshe Kaplan http://top-performance.blogspot.com Thank You ! Moshe Kaplan moshe.kaplan@brightaqua.com