Sonata-Princeton / SONATA-DEV

Query-Driven Streaming Network Telemetry
http://sonata.cs.princeton.edu
65 stars 28 forks source link

More problems with examples #41

Open kenzhang98 opened 4 years ago

kenzhang98 commented 4 years ago

While testing with the examples from Sonata, I have discovered the following issue:

vagrant@vighata:~/dev$ sudo $SPARK_HOME/bin/spark-submit sonata/examples/dns_ttl_tracking/test_app.py 
*********************************************************************
*                   Receiving User Queries                          *
*********************************************************************

Traceback (most recent call last):
  File "/home/vagrant/dev/sonata/examples/dns_ttl_tracking/test_app.py", line 40, in <module>
    runtime = Runtime(config, queries)
TypeError: __init__() takes exactly 4 arguments (3 given)

I think this is because of the lack of arguments when making the runtime instance.

runtime = Runtime(config, queries)

Meanwhile the ones that run has the extra argument:

runtime = Runtime(config, queries, os.path.dirname(os.path.realpath(__file__)))

This error should be in the following examples: completed_flow, dns_ttl_tracking, dns_tunneling, malicious_domain, reflection_dns, ssh_brute, udp_traffic_assymetry.

It seems like by replacing

runtime = Runtime(config, queries)

with

runtime = Runtime(config, queries, os.path.dirname(os.path.realpath(__file__)))

can fix the issue.

Another issue is that running some examples will produce another error:

vagrant@vighata:~/dev$ sudo $SPARK_HOME/bin/spark-submit sonata/examples/completed_flow/test_app.py 
Traceback (most recent call last):
  File "/home/vagrant/dev/sonata/examples/completed_flow/test_app.py", line 36, in <module>
    q3 = (n_syn.join(n_fin)
  File "/home/vagrant/dev/sonata/query_engine/sonata_queries.py", line 144, in join
    left_query = map_dict['query']
KeyError: 'query

I ran into this issue when running completed_flow.

chenIshi commented 4 years ago

Still encounter the same KeyError: 'query error.