Real-time data processing is no longer a luxury exercised by a few big companies but has become a necessity for businesses that want to compete, and Apache Storm is becoming the de facto standard to develop real-time processing pipelines. The key features of Storm are that it is horizontally scalable, fault-tolerant, and provides guaranteed message processing. Storm can solve various types of analytical problems, such as machine learning, log processing, and graph analysis.
Learning Storm will serve both as a getting-started guide for inexperienced developers and as a reference to implement advanced use cases with Storm for experienced developers. In the first two chapters, you will learn the basics of a Storm topology and various components of a Storm cluster. In the later chapters, you will learn how to build a Storm application that can interact with various other Big Data technologies and how to create transactional topologies. Finally, the last two chapters cover case studies for log processing and machine learning.
Chapter 1, Setting Up Storm on a Single Machine, gives an introduction to Storm and its components, followed by setting up a single-node Storm cluster, developing a sample Storm topology, and deploying it on a single-node cluster.
Chapter 2, Setting Up a Storm Cluster, covers the deployment of Storm in the cluster, deploys sample topology on a Storm cluster, discusses how we can achieve parallelism in Storm and how we can change the parallelism of the Storm topology in runtime, and even covers the basic Storm commands.
Chapter 3, Monitoring the Storm Cluster, introduces you to various ways of monitoring a Storm cluster, including the Storm UI and the Nimbus thrift client.
Chapter 4, Storm and Kafka Integration, introduces Apache Kafka, a message-queuing system, and shows how to integrate it with Storm to interact with data coming from external systems.
Chapter 5, Exploring High-level Abstraction in Storm with Trident, gives an introduction to Trident's function, filter, projection, aggregator, and repartitioning operations. It also covers a description of the transactional, non-transactional, and opaque transactional topologies. At the end, we cover how we can develop the sample Trident topology and how we can use the distributed RPC feature.
Chapter 6, Integration of Storm with Batch Processing Tools, shows you how to integrate Storm with Hadoop using the Storm-YARN framework.
Chapter 7, Integrating Storm with JMX, Ganglia, HBase, and Redis, shows you how to integrate Storm with various other Big Data technologies. It also focuses on how we can publish Storm's JVM metrics on Ganglia.
Chapter 8, Log Processing with Storm, covers a sample log processing application in which, we parse Apache web server logs and generate some business information from logfiles.
Chapter 9, Machine Learning, walks you through a case study of implementing a machine learning topology in Storm.
All of the code in this book has been tested on CentOS 6.4. It will run on other variants of Linux and Windows as well with respective changes in commands.
We have tried to keep the chapters self-contained, and the setup and installation of all the software used in each chapter is included in the chapter itself. The following software packages are used throughout the book:
CentOS 6.4
Oracle JDK 6/7
Apache ZooKeeper 3.4.5
Apache Storm 0.9.0.1
Eclipse or Spring Tool Suite
If you are a Java developer who wants to enter the world of real-time stream processing applications using Apache Storm, then this book is for you. No previous experience in Storm is required as this book starts from the basics. After finishing this book, you will be able to develop simple Storm applications.
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The LearningStormBolt
class extends the serialized BaseRichBolt
class."
A block of code is set as follows:
public void open(Map conf, TopologyContext context,SpoutOutputCollector spoutOutputCollector) { this.spoutOutputCollector = spoutOutputCollector; }
Any command-line input or output is written as follows:
# bin/storm nimbus
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Specify com.learningstorm
as Group Id and storm-example
as Artifact Id."
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <[email protected]>
, and mention the book title via the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
You can contact us at <[email protected]>
if you are having a problem with any aspect of the book, and we will do our best to address it.