Apache Spark User List - Getting the number of slaves
Try sc.getExecutorStorageStatus().length
SparkContext's getExecutorMemoryStatus or getExecutorStorageStatus will give you back an object per executor - the StorageStatus objects are what drives a lot of the Spark Web UI.
Read full article from Apache Spark User List - Getting the number of slaves
No comments:
Post a Comment