Github user liyezhang556520 commented on a diff in the pull request:
https://github.com/apache/spark/pull/7753#discussion_r45584427
--- Diff:
core/src/main/scala/org/apache/spark/network/netty/NettyBlockTransferService.scala
---
@@ -47,6 +50,39 @@ class NettyBlockTransferService(conf: SparkConf,
securityManager: SecurityManage
private[this] var server: TransportServer = _
private[this] var clientFactory: TransportClientFactory = _
private[this] var appId: String = _
+ private[this] var clock: Clock = new SystemClock()
+
+ /**
+ * Use a different clock for this allocation manager. This is mainly
used for testing.
+ */
+ def setClock(newClock: Clock): Unit = {
+ clock = newClock
+ }
+
+ override def getMemMetrics(executorMetrics: ExecutorMetrics): Unit = {
--- End diff --
the super class is `private[spark]`, do we still need to specify here?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]