I have run the below lines in the pypsark shell (mac, 8 cores).
import pandas as pd
df = spark.createDataFrame(pd.DataFrame(dict(a = list(range(1000)))
df.show()
I want to count my worker nodes (and see the number of cores on each), so I run the python commands in this post:
sc.getExecutorMemoryStatus().keys()
# JavaObject id=o151
len([executor.host() for executor in sc.statusTracker().getExecutorInfos() ]) -1
# 0
The above code indicates I have 1 worker. So, I checked the the spark UI I only have the driver with 8 cores:
Can work be done by the cores in the driver? If so, are 7 cores doing work and 1 is reserved for "driver" functionality? Why aren't worker nodes being created automatically?