Commit e6043a65 authored by Gurvinder Singh's avatar Gurvinder Singh

fixed typo in name

parent eb339cee
......@@ -18,11 +18,11 @@ sqlCtx.cacheTable("records")
top_dport = sqlCtx.sql("SELECT dstport, count(dstport) as c1 FROM records GROUP BY dstport ORDER BY c1 DESC LIMIT 10").map(lambda x: (x.dstport, x.c1)).collect()
print "Top Dest ports:"
print "{:>6} {:>12}".format("Dest Port", "Count")
for port, count in top_port:
for port, count in top_dport:
print "{:>6} {:>12}".format(port, count)
top_sport = sqlCtx.sql("SELECT srcport, count(srcport) as c1 FROM records GROUP BY srcport ORDER BY c1 DESC LIMIT 10").map(lambda x: (x.srcport, x.c1)).collect()
print "Top Src ports:"
print "{:>6} {:>12}".format("Src Port", "Count")
for port, count in top_port:
for port, count in top_sport:
print "{:>6} {:>12}".format(port, count)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment