Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions core/src/main/scala/org/apache/spark/util/AkkaUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private[spark] object AkkaUtils extends Logging {
}
val requireCookie = if (isAuthOn) "on" else "off"
val secureCookie = if (isAuthOn) secretKey else ""
logDebug("In createActorSystem, requireCookie is: " + requireCookie)
logDebug(s"In createActorSystem, requireCookie is: $requireCookie")

val akkaConf = ConfigFactory.parseMap(conf.getAkkaConf.toMap[String, String]).withFallback(
ConfigFactory.parseString(
Expand Down Expand Up @@ -140,8 +140,8 @@ private[spark] object AkkaUtils extends Logging {
def maxFrameSizeBytes(conf: SparkConf): Int = {
val frameSizeInMB = conf.getInt("spark.akka.frameSize", 10)
if (frameSizeInMB > AKKA_MAX_FRAME_SIZE_IN_MB) {
throw new IllegalArgumentException("spark.akka.frameSize should not be greater than "
+ AKKA_MAX_FRAME_SIZE_IN_MB + "MB")
throw new IllegalArgumentException(
s"spark.akka.frameSize should not be greater than $AKKA_MAX_FRAME_SIZE_IN_MB MB")
}
frameSizeInMB * 1024 * 1024
}
Expand Down Expand Up @@ -182,8 +182,8 @@ private[spark] object AkkaUtils extends Logging {
timeout: FiniteDuration): T = {
// TODO: Consider removing multiple attempts
if (actor == null) {
throw new SparkException("Error sending message as actor is null " +
"[message = " + message + "]")
throw new SparkException(s"Error sending message [message = $message]" +
" as actor is null ")
}
var attempts = 0
var lastException: Exception = null
Expand All @@ -200,13 +200,13 @@ private[spark] object AkkaUtils extends Logging {
case ie: InterruptedException => throw ie
case e: Exception =>
lastException = e
logWarning("Error sending message in " + attempts + " attempts", e)
logWarning(s"Error sending message [message = $message] in $attempts attempts", e)
}
Thread.sleep(retryInterval)
}

throw new SparkException(
"Error sending message [message = " + message + "]", lastException)
s"Error sending message [message = $message]", lastException)
}

def makeDriverRef(name: String, conf: SparkConf, actorSystem: ActorSystem): ActorRef = {
Expand Down