Skip to content

Commit

Permalink
for spark 2.3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
allwefantasy committed Dec 4, 2018
1 parent f03b271 commit 21d620f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class SparkInstanceService(session: SparkSession) {
var totalMemory = 0l
session.sparkContext.statusTracker.getExecutorInfos.map { worker =>
totalTasks += worker.numRunningTasks()
totalUsedMemory += (worker.usedOnHeapStorageMemory() + worker.usedOffHeapStorageMemory())
totalMemory += (worker.totalOnHeapStorageMemory() + worker.totalOffHeapStorageMemory())
totalUsedMemory += -1
totalMemory += -1

}
SparkInstanceResource(totalTasks, totalUsedMemory, totalMemory)
Expand Down

0 comments on commit 21d620f

Please sign in to comment.