Skip to content

Instantly share code, notes, and snippets.

@ebuildy
Created April 7, 2017 08:42
Show Gist options
  • Save ebuildy/4fb26a225e5e9109e74c193fe2ea438b to your computer and use it in GitHub Desktop.
Save ebuildy/4fb26a225e5e9109e74c193fe2ea438b to your computer and use it in GitHub Desktop.
Get total memory used by all executors on Apache Spark
sc.getExecutorMemoryStatus.map(a => (a._2._1 - a._2._2)/(1024.0*1024*1024)).sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment