Github user markhamstra commented on a diff in the pull request: https://github.com/apache/spark/pull/4703#discussion_r25056762 --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala --- @@ -229,41 +227,56 @@ class DAGScheduler( /** * Create a Stage -- either directly for use as a result stage, or as part of the (re)-creation - * of a shuffle map stage in newOrUsedStage. The stage will be associated with the provided - * jobId. Production of shuffle map stages should always use newOrUsedStage, not newStage - * directly. + * of a shuffle map stage in newOrUsedShuffleStage. The stage will be associated with the provided + * jobId. Production of shuffle map stages should always use newOrUsedShuffleStage, + * not getAndRegNewShuffleMap directly. */ - private def newStage( - rdd: RDD[_], - numTasks: Int, - shuffleDep: Option[ShuffleDependency[_, _, _]], - jobId: Int, - callSite: CallSite) - : Stage = - { + private def getAndRegNewShuffleMap(rdd: RDD[_], + numTasks: Int, + shuffleDep: ShuffleDependency[_, _, _], + jobId: Int, + callSite: CallSite): ShuffleMapStage = { val parentStages = getParentStages(rdd, jobId) - val id = nextStageId.getAndIncrement() - val stage = new Stage(id, rdd, numTasks, shuffleDep, parentStages, jobId, callSite) + val id = nextStageId.getAndIncrement + val stage: ShuffleMapStage = new ShuffleMapStage(id, rdd, numTasks, parentStages, + jobId, callSite, shuffleDep) + stageIdToStage(id) = stage updateJobIdStageIdMaps(jobId, stage) stage } /** + * Create a Stage -- either directly for use as a result stage, or as part of the (re)-creation + * of a shuffle map stage in newOrUsedShuffleStage. The stage will be associated with the provided + * jobId. Production of shuffle map stages should always use newOrUsedShuffleStage, + * not getAndRegNewResults directly. + */ + private def getAndRegNewResults(rdd: RDD[_], + numTasks: Int, + jobId: Int, + callSite: CallSite): ResultStage = { --- End diff -- Indentation of this one's even worse than the others. Please fix all your `def`s to adhere to the Style Guide.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org