Github user BryanCutler commented on a diff in the pull request:
https://github.com/apache/spark/pull/6205#discussion_r33077284
--- Diff: core/src/main/scala/org/apache/spark/rpc/RpcEnv.scala ---
@@ -182,3 +184,109 @@ private[spark] object RpcAddress {
RpcAddress(host, port)
}
}
+
+
+/**
+ * An exception thrown if RpcTimeout modifies a [[TimeoutException]].
+ */
+private[rpc] class RpcTimeoutException(message: String, cause:
TimeoutException)
+ extends TimeoutException(message) { initCause(cause) }
+
+
+/**
+ * Associates a timeout with a description so that a when a
TimeoutException occurs, additional
+ * context about the timeout can be amended to the exception message.
+ * @param timeout timeout duration in seconds
+ * @param conf the configuration parameter that controls this timeout
+ */
+private[spark] class RpcTimeout(timeout: FiniteDuration, val conf: String)
{
+
+ /** Get the timeout duration */
+ def duration: FiniteDuration = timeout
--- End diff --
Sure, that sounds good. One other minor question @squito , the constructor
has the parameter `conf: String` while `apply` has `conf: SparkConf` and
`timeoutProp: String` which seems a little unclear. I think it might be better
to stay consistent and have the constructor say `timeoutProp` instead of
`conf`, like this
```scala
class RpcTimeout(val duration: FiniteDuration, val timeoutProp: String)
```
what do you think?
---
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]