Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/1056#discussion_r15248363
--- Diff: core/src/main/scala/org/apache/spark/util/AkkaUtils.scala ---
@@ -124,4 +127,59 @@ private[spark] object AkkaUtils extends Logging {
/** Space reserved for extra data in an Akka message besides serialized
task or task result. */
val reservedSizeBytes = 200 * 1024
+
+ /** Returns the configured number of times to retry connecting */
+ def numRetries(conf: SparkConf): Int = {
+ conf.getInt("spark.akka.num.retries", 3)
+ }
+
+ /** Returns the configured number of milliseconds to wait on each retry
*/
+ def retryWaitMs(conf: SparkConf): Int = {
+ conf.getInt("spark.akka.retry.wait", 3000)
+ }
+
+ /**
+ * Send a message to the given actor and get its result within a default
timeout, or
+ * throw a SparkException if this fails.
+ */
+ def askWithReply[T](message: Any, actor: ActorRef, retryAttempts: Int,
+ retryInterval: Int, timeout: FiniteDuration): T = {
--- End diff --
same format nit
---
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.
---