Twends is an app for discovering hyper-local Twitter trends
- Dylan Ahearn
- Peter Wang
- Elliot Whitehead
- Evan Yin
-
Install pip (if needed)
- Ubuntu:
apt-get update; apt-get -y install python-pip
- MacOS:
sudo easy_install pip
- Ubuntu:
-
Install virtualenv:
sudo pip install virtualenv
-
Create a new virtualenv environment to isolate dependancies:
virtualenv venv
-
Activate your new virtual environment (Must be done every time to run the codebase):
source venv/bin/activate
- To deactivate the virtual environment, simply run
deactivate
(or kill terminal session)
- To deactivate the virtual environment, simply run
-
Install project dependencies:
pip install -r requirements.txt
(give it a minute, the Cassandra driver will take a while!) -
Start a Cassandra server running in the foreground:
cassandra/bin/cassandra -f
(to check on node statuses, runcassandra/bin/nodetool status
) -
Sync the db:
twends/manage.py sync_cassandra
-
To start the Django app server, run
python twends/manage.py runserver
-
Visit http://localhost:8000 to see your running Django app!
-
Dowload DataStax at https://academy.datastax.com/ , you will have to create a free account.
-
Download for Mac or linux, select the install directory to be green-gopher. (Watch the install instruction video. You might have to reinstall it if you did it wrong)
-
To run cassandra go into the dse folder an type "bin/dse cassandra"
-
possible errors- if log error delete the logs in "dse/commitlog", if an error with gossiping to seeds, go into "dse/resources/cassandra/conf/cassandra.yaml and make the listen address blank.
-
To see if your cassandra node is up and running type "bin/nodetool status"
-
go into the cql shell with "bin/dse cqlsh".
-
to set up a test database run the commands in cqlCreateTable
-
to run spark use the command "bin/dse spark" this runs spark with scala. to close use 'exit()'
-
to check if spark is active use bin/dsetool ring
Cassandra v3.10