Upload
datatorrent
View
64
Download
0
Embed Size (px)
Citation preview
© 2015 DataTorrent
Munagala V. Ramanath (“Ram”) [email protected] 16th, 2016
Building your First Apache Apex Application
© 2015 DataTorrent
OutlineMain concepts of an Apex Application.Brief description of the "Sorted Word Count" application.Hands on demonstration of cloning the source repository and building Apex source code.Hands on demonstration of creating a new application.Running the application.Code walk-through.Questions
© 2015 DataTorrent
Main Concepts Applications are built from Operators which implement the Operator interface; each operator has input/output ports which are connected by streams to form a directed acyclic graph (DAG).A BaseOperator class is provided which provides empty implementations of all the required methods.Within an operator, define necessary input and output ports typically using the DefaultInputPort and DefaultOutputPort classes.The Application class implements the StreamingApplication interface; need only implement populateDAG() method which wires the operators together.Applications process data within time-based windows, typically 0.5s.
© 2015 DataTorrent
The Sorted Word Count Application
The following operators are involved:LineReader: reads file dropped into input directory and outputs lines (on its output port).WordReader: splits each line into words using a regex.WindowWordCount: compute and emit word frequencies for all words in lines processed in current window.FileWordCount: accumulates all word counts for current file and emits final sorted list when EOF is reached.WordCountWriter: writes list to output file in output directory.
© 2015 DataTorrent
The DAG
© 2015 DataTorrent
Resources
6
• Apache Apex - http://apex.apache.org/• Subscribe - http://apex.apache.org/community.html• Download - https://www.datatorrent.com/download/• Twitter
ᵒ @ApacheApex; Follow - https://twitter.com/apacheapexᵒ @DataTorrent; Follow – https://twitter.com/datatorrent
• Meetups - http://www.meetup.com/topics/apache-apex• Webinars - https://www.datatorrent.com/webinars/• Videos - https://www.youtube.com/user/DataTorrent• Slides - http://www.slideshare.net/DataTorrent/presentations • Startup Accelerator Program - Full featured enterprise product
ᵒ https://www.datatorrent.com/product/startup-accelerator/
© 2015 DataTorrent
We Are Hiring
7
• [email protected]• Developers/Architects• QA Automation Developers• Information Developers• Build and Release• Community Leaders
© 2015 DataTorrent
End
8