Github user rezasafi commented on a diff in the pull request:
https://github.com/apache/spark/pull/21916#discussion_r206376041
--- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala
---
@@ -180,6 +181,34 @@ private[spark] abstract class MemoryManager(
onHeapStorageMemoryPool.memoryUsed +
offHeapStorageMemoryPool.memoryUsed
}
+ /**
+ * On heap execution memory currently in use, in bytes.
+ */
+ final def onHeapExecutionMemoryUsed: Long =
onHeapExecutionMemoryPool.memoryUsed
+
+ /**
+ * Off heap execution memory currently in use, in bytes.
+ */
+ final def offHeapExecutionMemoryUsed: Long =
offHeapExecutionMemoryPool.memoryUsed
+
+ /**
+ * On heap storage memory currently in use, in bytes.
+ */
+ final def onHeapStorageMemoryUsed: Long =
onHeapStorageMemoryPool.memoryUsed
+
+ /**
+ * Off heap storage memory currently in use, in bytes.
+ */
+ final def offHeapStorageMemoryUsed: Long =
offHeapStorageMemoryPool.memoryUsed
+
+ /**
+ * If the system isn't procfsBased the process tree metrics' values
will be -1,
+ * meaning not available
+ */
+ final val pTreeInfo: ProcessTreeMetrics = new ProcfsBasedSystems
+ if (pTreeInfo.isAvailable) {
--- End diff --
I will change this as well. It is a final val since other metrics were also
final. Will check the lazy val, but probably not much difference since this
initiation will be executed just one time anyway.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]