python - Why is Spark's show() function very slow? -


i have

df.select("*").filter(df.itemid==itemid).show() 

and never terminated, if do

print df.select("*").filter(df.itemid==itemid) 

it prints in less second. why this?

that's because select , filter building execution instructions, aren't doing data. then, when call show executes instructions. if isn't terminating, i'd review logs see if there errors or connection issues. or maybe dataset still large - try taking 5 see if comes quick.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -