Skip to content

brunorafaeli/bigdata_monitoramento_de_redes_sociais

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

bigdata_monitoramento_de_redes_sociais

Trabalho Prático

Setup IntelliJ IDEA

Clone repository:

$ git clone https://github.com/brunorafaeli/bigdata_monitoramento_de_redes_sociais.git

In IntelliJ IDEA:

  • File -> New -> Project from Exsiting Sources...
  • Select social-networks-monitor-alarm-idea-project directory (ok)
  • Select Import project from external model -> sbt (next)
  • Check:
    • Create directories for empty content root automatically
    • Download source and docs
    • Download SBT source and docs
  • Select Project sdk = 1.8
  • Click Finish

Run

spark-submit --master local[4] social-networks-monitor-alarm-idea-project.jar \
consumerKey consumerSecret accessToken accessTokenSecret \
dictfilenm \ 
outdir \
historicinterval \
recenticinterval \
stubport \
limit_stdev_cof \

Parameters:

  • consumerKey consumerSecret accessToken accessTokenSecret - Twitter Tokens
  • dictfilenm - File path of a dictionary with company's categories terms
  • outdir - Directory where output files will be placed
  • historicinterval - Historical interval in minutes (int)
  • recenticinterval - Recent interval in minutes (int)
  • stubport - Port number where stub stream will be listening.Set 0 to disable (int)
  • limit_stdev_cof- Coefficient of historic stdev to trigger alarm (float)

##Generate Dataset

Command to run: python generate_dataset.py

Line 12 - Decide the number of dataset lines

Line 13 - Decide when the script will influence on dataset

##Simulate Twittes

Command to run: python simulate_twittes.py

Line 8 - Decide the number of lines to read before the sleep command

Line 21 - Decide how long it will wait until the next reading

##Generate Graph

Command to run: python graph.py