http=sqlCtx.sql("SELECT text FROM records WHERE val1 >= 1 AND val1 <= 41")
text=http.map(lambdap:"Text: "+p.text)
print(text.collect())
top_port=sqlCtx.sql("SELECT dstport, count(dstport) as c1 FROM records GROUP BY dstport ORDER BY c1 DESC LIMIT 10").map(lambdax:(x.dstport,x.c1)).collect()