Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Python Real time Applications with Storm

You're reading from   Building Python Real time Applications with Storm Learn to process massive real-time data streams using Storm and Python—no Java required!

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781784392857
Length 122 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Running the topology – the Redis case


We have a few more small things to address before we run the topology:

  1. Copy the logconfig.ini file from the second example in Chapter 3, Introducing Petrel, to this topology's directory.

  2. Create a file called setup.sh. Petrel will package this script with the topology and run it at startup. This script installs the third-party Python libraries used by the topology. The file looks like this:

    pip install -U pip
    pip install nltk==3.0.1 oauthlib==0.7.2
    tweepy==3.2.0
  3. Create a file called manifest.txt with these two lines:

    logconfig.ini
    setup.sh
  4. Install the Redis server on a well-known node. All workers will store state here:

             sudo apt-get install redis-server
  5. Install the Python Redis client on all Storm worker machines:

             sudo apt-get install python-redis
  6. Before running the topology, let's review the list of files that we've created. Make sure you have created these files correctly:

    • topology.yaml

    • twitterstream.py

    • splitsentence.py

    • rollingcount.py

    • totalrankings...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image