spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pwendell <>
Subject [GitHub] spark pull request: SPARK-1244: Throw exception if map output stat...
Date Sun, 16 Mar 2014 01:07:30 GMT
Github user pwendell commented on a diff in the pull request:
    --- Diff: core/src/main/scala/org/apache/spark/MapOutputTracker.scala ---
    @@ -35,13 +35,21 @@ private[spark] case class GetMapOutputStatuses(shuffleId: Int)
       extends MapOutputTrackerMessage
     private[spark] case object StopMapOutputTracker extends MapOutputTrackerMessage
    -private[spark] class MapOutputTrackerMasterActor(tracker: MapOutputTrackerMaster)
    +private[spark] class MapOutputTrackerMasterActor(tracker: MapOutputTrackerMaster, conf:
       extends Actor with Logging {
    +  val maxAkkaFrameSize = AkkaUtils.maxFrameSizeBytes(conf)
       def receive = {
         case GetMapOutputStatuses(shuffleId: Int) =>
           val hostPort = sender.path.address.hostPort
           logInfo("Asked to send map output locations for shuffle " + shuffleId + " to "
+ hostPort)
    -      sender ! tracker.getSerializedMapOutputStatuses(shuffleId)
    +      val mapOutputStatuses = tracker.getSerializedMapOutputStatuses(shuffleId)
    +      val serializedSize = mapOutputStatuses.size
    +      if (serializedSize > maxAkkaFrameSize) {
    +        throw new SparkException(s"Map output statuses were $serializedSize bytes which
" +
    +          s"exceeds spark.akka.frameSize ($maxAkkaFrameSize bytes).")
    --- End diff --
    Hm great point @markhamstra I forgot the actor will swallow it. I think our only option
here is to just log an error because we can't change the message format between the master
and worker (e.g. to allow the master to signal a failure in it's response) in a maintenance
release and this is something we are trying to fix for 0.9.1.

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 or file a JIRA ticket
with INFRA.

View raw message